I can't get the Format Code block to work correctly so it's a little sloppy...
Protected Sub RadGrid1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid1.SelectedIndexChanged
foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
{ If (item.Selected) Then
{
string strTxt = item["ProductName"].Text;
}
}
End Sub
I am able to do this and loop through each row in the grid. It will loop through 10 times which is the number of rows in the grid:
For Each GridDataItem RadGrid1.MasterTableView.Items
'Do something here
Next
But when I try to define the "item" I get errors. I tried this:
For Each Item As GridDataItem In RadGrid1.MasterTableView.Items
'Do Something Here Next
And This:
Dim Item As GridDataItem (I get error here telling me GridDataItem is not defined)
For Each GridDataItem In RadGrid1.MasterTableView.Items
'Do Something Here
Next
What Am I missing here?