DataGrid Footer Control

J

Jay

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?
 
Joined
Jul 27, 2006
Messages
2
Reaction score
0
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.
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top