<selectedItemTemplate>

S

Steve Klett

I can't find how to implement a selectedItemTemplate using a datagrid.

I'm using Columns->asp:templateColumn->ItemTemplate

There is not SelectedItemTemplate. How do you format the data for the
selected row of a datagrid?

Thanks,
Steve
 
M

Mike Moore [MSFT]

Hi,

To format the selected row, use SelectedItemStyle. In the following HTML
snippet, I've changed the ForeColor of all four template types.

<asp:DataGrid id="DataGrid1" runat="server">
<SelectedItemStyle ForeColor="Red"></SelectedItemStyle>
<EditItemStyle ForeColor="Black"></EditItemStyle>
<AlternatingItemStyle ForeColor="Blue"></AlternatingItemStyle>
<ItemStyle ForeColor="Aqua"></ItemStyle>
</asp:DataGrid>


Thank you, Mike
Microsoft, ASP.NET Support Professional

Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.


--------------------
 
S

Steve Klett

Thanks Mike,

Not quite a solution though for my needs thgouh... Looking forward to this
being added, I hope. ;)

-SK


"Mike Moore [MSFT]" said:
Hi,

To format the selected row, use SelectedItemStyle. In the following HTML
snippet, I've changed the ForeColor of all four template types.

<asp:DataGrid id="DataGrid1" runat="server">
<SelectedItemStyle ForeColor="Red"></SelectedItemStyle>
<EditItemStyle ForeColor="Black"></EditItemStyle>
<AlternatingItemStyle ForeColor="Blue"></AlternatingItemStyle>
<ItemStyle ForeColor="Aqua"></ItemStyle>
</asp:DataGrid>


Thank you, Mike
Microsoft, ASP.NET Support Professional

Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer's security.

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
From: "Steve Klett" <[email protected]>
Subject: <selectedItemTemplate>
Date: Mon, 17 Nov 2003 13:20:59 -0800
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
NNTP-Posting-Host: 190.muaa.sttl.sttwa01r1.dsl.att.net 12.102.48.190
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.datagridcontrol:7472
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol

I can't find how to implement a selectedItemTemplate using a datagrid.

I'm using Columns->asp:templateColumn->ItemTemplate

There is not SelectedItemTemplate. How do you format the data for the
selected row of a datagrid?

Thanks,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top