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

How to populate a Radgrid based on the row selection from another Radgrid

1 Answer 261 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 12 May 2012, 09:46 AM

I have two RadGrids, which are on different page(one is in base page another one in Overlay). Both are prepopulating and in first grid i have checkboxes for each row.


Now i want to add a new row in my second grid , based on the row selection of first grid means which rows checkboxes are checked.

Can anyone send me any sample code to do that. please Suggest.

Thanks.



1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 15 May 2012, 06:52 PM
Sandeep:

I would suggest that you take a close look at the following demos that should help you accomplish your task:

Grid/Master/Detail Grids which demonstrates how to populate your second grid based on the row selected in the primary grid.

However, since the two radgrids are located on seperate pages, you will need to transfer the SelectedItem value (datakeyvalue) to your second page. You can consider using a url parameter or a session variable. In the SelectedIndexChanged event of grid, redirect to new page by passing the selecteditem value as url parameter. You should be able to populate the grid in your overlay page by using this passed value.
 
Also, you can reference the Grid/Accessing Cells and Rows online demo for insights on getting the selected row's datakey value based on a check box selection.

Hope this helps!
Tags
Grid
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or