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

Get Selected Rows, display in second grid in session

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 2
Brett asked on 11 Apr 2008, 06:15 PM
My grid has a check box column, once I select all my items I click a button.

On the button click I want to "copy" only the selected rows into a second grid.  I do not want to commit anything to a database yet as the second grid acts as a summary, so they may go back and select more rows in the first grid.

Can someone help me on my way here?

Brett

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 14 Apr 2008, 02:34 PM
Hello,

In order to scheived the required functionality, you can attach to the OnRowSelected event handler, and iterate through the RadGridClientObject.MasterTableView.SelectedRows collection.
This will give you access to all the rows currently selected, and you can then access each cell individually, to get its value.
After that you could initiate an ajax request to add the selected values in the second RadGrid DataSource (if the both DataSources has the same structure).
I hope this is a suitable approach for you.

Greetings,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Brett
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Share this question
or