G
Guest
How to find a control in the datagrid footer ?
In my code below, I am trying to hide a label named lbl1 on the basis of a selected vlaue(value="test") of the dropdownlist ,both the dropdownlist and the label are in the footer of the datagrid.
An advice on where I am going wrong,would be highly appreciated
For Each datagriditem In dg1.Items
Dim str as string="test" 'this gives the value of selected item from the dropdown list in the footer
If datagriditem.ItemType = ListItemType.Footer Then
Dim lbl As New Label
lbl = CType(datagriditem.FindControl("lbl1"), Label)
If str = "test" Then
lbl.Visible = False
End If
End If
Next
Rgds
Shiju
In my code below, I am trying to hide a label named lbl1 on the basis of a selected vlaue(value="test") of the dropdownlist ,both the dropdownlist and the label are in the footer of the datagrid.
An advice on where I am going wrong,would be highly appreciated
For Each datagriditem In dg1.Items
Dim str as string="test" 'this gives the value of selected item from the dropdown list in the footer
If datagriditem.ItemType = ListItemType.Footer Then
Dim lbl As New Label
lbl = CType(datagriditem.FindControl("lbl1"), Label)
If str = "test" Then
lbl.Visible = False
End If
End If
Next
Rgds
Shiju