I want to loop through a hierarchy radgrid to find a specific value within the 2nd level of the rad grid's hierarchy. I do not want the value of the key, but the values of other columns within the 2nd level of the hierarchy. How can I loop through the items to obtain these values. This is what I have so far, but it does not work....
Protected Sub RadGrid_Inventory_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid_Inventory.PreRender
For Each item As GridDataItem In RadGrid_Inventory.Items
If (item.OwnerTableView.Name = "Inv_Desc") Then
Dim lblRowID As Label = DirectCast(item.FindControl("lblRowID"), Label)
Dim Delete As ImageButton = DirectCast(item.FindControl("Delete"), ImageButton)
If lblRowID.Text = -1 Then
Delete.Visible = False
Else
Delete.Visible = True
End If
End If
Next
End Sub
Protected Sub RadGrid_Inventory_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid_Inventory.PreRender
For Each item As GridDataItem In RadGrid_Inventory.Items
If (item.OwnerTableView.Name = "Inv_Desc") Then
Dim lblRowID As Label = DirectCast(item.FindControl("lblRowID"), Label)
Dim Delete As ImageButton = DirectCast(item.FindControl("Delete"), ImageButton)
If lblRowID.Text = -1 Then
Delete.Visible = False
Else
Delete.Visible = True
End If
End If
Next
End Sub