can any one help me out in getting the row selected value in hierarchial grid(parent and child grid).
the following code is on the double click event of my grid, check to see if it is a parent row or a child row and then get the value from the grid. hope this helps....
If Not grdTop.DisplayLayout.ActiveRow Is Nothing Then
Dim intBand As Integer = grdTop.DisplayLayout.ActiveRow.Band.Index
Dim intParentRow As Integer
If oRow.HasParent Then
intParentRow = oRow.ParentRow.Index
Else
intParentRow = intRow
End If
Dim strValue As String = grdTop.DisplayLayout.Rows(intParentRow).Cells(1).ToString()
.....
Iam guessing your grid is database bound and you are building it with parent child relationship. if so, in my code above
if there is no parent row it will take intRow (child row which is the active row or selected row). check your parent child relationship and check to see if the active row is returning you correct row index. hope this helps.
hi vanitha thanks for your kind help. using above code i am getting the parent row values only but i am unable to get the child row values.
can you jsut provide me any other sample code if you have it.