Hi,
When the grid loads or is paged or sorted - I need to have the first row selected and to be able to pass the ID of that row to a seperate details section on the same page. (The ID is taken by a data reader which populates some labels) - Is this possible please?
For selecting the row, I tried converting the SelectFirstGridRow from the WebMail demo but in VB 'OfType' was not available.
Cheers, Jon
When the grid loads or is paged or sorted - I need to have the first row selected and to be able to pass the ID of that row to a seperate details section on the same page. (The ID is taken by a data reader which populates some labels) - Is this possible please?
For selecting the row, I tried converting the SelectFirstGridRow from the WebMail demo but in VB 'OfType' was not available.
private void SelectFirstGridRow() |
{ |
GridDataItem firstDataItem = RadGrid1.Items.OfType<GridDataItem>().FirstOrDefault(); |
if (firstDataItem != null) |
firstDataItem.Selected = true; |
} |
Private Sub SelectFirstGridRow() |
Dim firstDataItem As GridDataItem = RadGrid1.Items.OfType(Of GridDataItem)().FirstOrDefault() |
If firstDataItem <> Nothing Then |
firstDataItem.Selected = True |
End If |
End Sub |
Cheers, Jon