DataGrid Footer Control

Discussion in 'ASP .Net' started by Jay, Feb 4, 2005.

  1. Jay

    Jay Guest

    How can I set TextBox1.Text to "something" from a button_click event? So
    outside of the datagrid (dg1) I have a button (button1). When I click that
    button I want to set the text in TextBox1 (a control in the datagrid
    <footertemplate>) tp "somthing". How can this be done in button1_click?
     
    Jay, Feb 4, 2005
    #1
    1. Advertising

  2. Jay

    rajanand_m

    Joined:
    Jul 27, 2006
    Messages:
    2
    Dim irow As Integer
    For irow = DataGridxx.Controls(0).Controls.Count - 1 To 0 Step -1
    If CType(DataGridxx.Controls(0).Controls(irow), DataGridItem).ItemType = ListItemType.Footer Then
    Dim footer As DataGridItem = CType(DataGridxx.Controls(0).Controls(irow), DataGridItem)
    ' footer.FindControl("mycontrol") etc
    End if
    Next

    try it out.
     
    rajanand_m, Jul 27, 2006
    #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. Darren Spooner

    remove a control from a datagrid footer

    Darren Spooner, Oct 14, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    349
    Alvin Bruney
    Oct 15, 2003
  2. Chamindu R Munasinghe

    ASP.NET User control in Datagrid Footer

    Chamindu R Munasinghe, Jan 9, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    1,012
    Peter Blum
    Jan 10, 2004
  3. Sebastian

    DataGrid and footer control validation

    Sebastian, Apr 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    532
    Peter Blum
    Apr 19, 2004
  4. Jay
    Replies:
    0
    Views:
    403
  5. Henrik
    Replies:
    1
    Views:
    428
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
Loading...

Share This Page