<selectedItemTemplate>

Discussion in 'ASP .Net Datagrid Control' started by Steve Klett, Nov 17, 2003.

  1. Steve Klett

    Steve Klett Guest

    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
     
    Steve Klett, Nov 17, 2003
    #1
    1. Advertising

  2. 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" <>
    > 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: <#>
    > 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
    >
    >
    >
     
    Mike Moore [MSFT], Nov 18, 2003
    #2
    1. Advertising

  3. Steve Klett

    Steve Klett Guest

    Thanks Mike,

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

    -SK


    ""Mike Moore [MSFT]"" <> wrote in message
    news:...
    > 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" <>
    > > 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: <#>
    > > 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
    > >
    > >
    > >

    >
     
    Steve Klett, Nov 19, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Randy Vande Hei
    Replies:
    0
    Views:
    596
    Randy Vande Hei
    Aug 4, 2003
  2. Dirk Meusel
    Replies:
    1
    Views:
    3,034
    Dirk Meusel
    Aug 19, 2003
  3. Raymond Du
    Replies:
    1
    Views:
    473
    Johann MacDonagh
    Dec 5, 2004
  4. Randy Vande Hei

    datagrid within SelectedItemTemplate of another grid

    Randy Vande Hei, Aug 4, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    128
    Randy Vande Hei
    Aug 4, 2003
  5. Lubomir

    SelectedItemTemplate is ignored

    Lubomir, Feb 26, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    129
    Lubomir
    Feb 26, 2005
Loading...

Share This Page