TemplateColumn

Discussion in 'ASP .Net Datagrid Control' started by Thomas, Nov 23, 2003.

  1. Thomas

    Thomas Guest

    Using C# code I would like to find out the Controls a
    user places in a TemplateColumn. Is there a way to loop
    through all the items in a TemplateColumn? Thanks.
     
    Thomas, Nov 23, 2003
    #1
    1. Advertising

  2. Thomas

    Teemu Keiski Guest

    Well,

    you can loop through all DataGrid's Items and in every item you can access
    the column (basically cell in this matter).

    foreach(DataGridItem item in DataGrid1.Items)
    {
    //Find control in cell 0(basically column at index 0)
    Control c=item.Cells[0].FindControl("ID");
    }

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist


    "Thomas" <> wrote in message
    news:00b201c3b200$f512cce0$...
    > Using C# code I would like to find out the Controls a
    > user places in a TemplateColumn. Is there a way to loop
    > through all the items in a TemplateColumn? Thanks.
     
    Teemu Keiski, Nov 26, 2003
    #2
    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. Bob
    Replies:
    0
    Views:
    625
  2. Nus Pieds

    TemplateColumn CheckBox

    Nus Pieds, Jul 16, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    389
    Nus Pieds
    Jul 16, 2003
  3. Edward

    TemplateColumn Width

    Edward, Nov 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,242
    S. Justin Gengo
    Nov 21, 2003
  4. Maziar Aflatoun

    TemplateColumn with multiple parameters

    Maziar Aflatoun, Jan 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    409
  5. Solomon Shaffer

    CommandArgument in TemplateColumn

    Solomon Shaffer, Jan 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    712
    Solomon Shaffer
    Jan 16, 2004
Loading...

Share This Page