This is a migrated thread and some comments may be shown as answers.

[Solved] How to get selected row in RadGrid

2 Answers 170 Views
Grid
This is a migrated thread and some comments may be shown as answers.
S
Top achievements
Rank 1
S asked on 15 Jul 2009, 05:06 PM
Hi,
So I have 2 grids in my page. Selecting on a row in top grid, results in new data in the 2nd grid.
I have a NeedDataSourceHandler in the second grid, but I am not able to retrieve the primary key of the row in the 1st grid
that was cliecked on ....
Protected Sub ReptSummaryGrid_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles ReptSummaryGrid.NeedDataSource 
        If e.IsFromDetailTable Then 
            LoadReportsSummary(8) 
        End If 
    End Sub 

The SelectedValue property of the 'source' is always coming as Nothing....

Any help is appreciated...

2 Answers, 1 is accepted

Sort by
0
S
Top achievements
Rank 1
answered on 15 Jul 2009, 05:29 PM
Actually, since the 2 grids are independent - instead of handling the NeedDataSourceEvent for the "child" grid; I guess
I will handle the SelectedIndexChanged event of the "parent" grid .....
0
Daniel
Telerik team
answered on 16 Jul 2009, 12:04 PM
Hello,

I suggest you take a look at the following link that demonstrates how to create related grids:
Master/Detail Grids

I hope this helps.

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
S
Top achievements
Rank 1
Answers by
S
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or