I’m having a problem with the selection of rows in a Master/Detail Grid.
Scenario: I have a page with two grids that are connected via a Master/Detail relationship. It is similar to http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectedvalue/defaultcs.aspx, except I have two grids instead of three and my page’s pre-render event codebehind looks like:
| Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender |
| If RadGrid1.SelectedIndexes.Count = 0 Then |
| RadGrid1.SelectedIndexes.Add(0) |
| End If |
| End Sub |
When the page loads for the first time, the first row in the Master grid is selected, but not the first row in the Detail grid.
I wanted to know how to select the first row in the Detail Grid of a Master/Detail Grid on the first load of the page if the Detail grid has any rows related to that particular Master grid item at Index(0).