J
Jim Heavey
Hello, I am trying to figure out how to get to the "footer" control in a
datagrid. I set up the following logic:
Dim cntrl As Control
Dim cnt As Integer = dgNewMovies.Controls.Count
For Each cntrl In dgNewMovies.Controls
Dim cntrlName As String = cntrl.ID
If TypeOf cntrl Is System.Web.UI.WebControls.DataGridItem Then
Dim item As System.Web.UI.WebControls.DataGridItem = CType(cntrl,
System.Web.UI.WebControls.DataGridItem)
If item.ItemType = ListItemType.Footer Then
End If
End If
Next
I only get a single control... My count (2nd instruction) only has a count
of 1.
I thought that perhaps I needed to look for System.Web.UI.Control but the
way that it is stated is a System.Web.UI.Control.
So how do I iterate through all of the controls on the Datagrid!
Thanks in advance for your assistance!!!
datagrid. I set up the following logic:
Dim cntrl As Control
Dim cnt As Integer = dgNewMovies.Controls.Count
For Each cntrl In dgNewMovies.Controls
Dim cntrlName As String = cntrl.ID
If TypeOf cntrl Is System.Web.UI.WebControls.DataGridItem Then
Dim item As System.Web.UI.WebControls.DataGridItem = CType(cntrl,
System.Web.UI.WebControls.DataGridItem)
If item.ItemType = ListItemType.Footer Then
End If
End If
Next
I only get a single control... My count (2nd instruction) only has a count
of 1.
I thought that perhaps I needed to look for System.Web.UI.Control but the
way that it is stated is a System.Web.UI.Control.
So how do I iterate through all of the controls on the Datagrid!
Thanks in advance for your assistance!!!