Method to Access Controls In A DataGrid Footer

Discussion in 'ASP .Net Datagrid Control' started by SteveFoo, Mar 6, 2004.

  1. SteveFoo

    SteveFoo Guest

    Hi,

    I noticed some ppls are struggling on access Controls In A DataGrid
    Footer

    this is the way i done and works pretty well .

    Take a look Maybe useful for u :)

    public void EventFired(object sender, System.EventArgs e)
    {

    foreach(DataGridItem dgi in this.dtg.Controls[0].Controls)
    {

    if(dgi.ItemType == ListItemType.Footer)
    {
    DropDownList
    ddl=((DropDownList)dgi.FindControl("ddlIdentAdd"));
    if(ddl.SelectedItem.Text.Equals("Block"))
    {
    ((TextBox)dgi.FindControl
    ("t1")).Enabled=true;
    }//end if

    }//end if

    }//end foreach loop

    } //end method
    SteveFoo, Mar 6, 2004
    #1
    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. Tim Burda

    How Access Controls In A DataGrid Footer

    Tim Burda, Jul 8, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    132
    TiSch
    Dec 17, 2004
  2. Nofear

    A solution to finding controls in datagrid footer...

    Nofear, Aug 11, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    228
  3. George

    Access to controls in footer template

    George, May 11, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    5
    Views:
    215
    Leonardo Rodríguez
    May 12, 2004
  4. Henrik
    Replies:
    1
    Views:
    416
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
  5. Replies:
    0
    Views:
    147
Loading...

Share This Page