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

How to record the selected items in a new radgrid control in the same page

3 Answers 115 Views
Grid
This is a migrated thread and some comments may be shown as answers.
yan
Top achievements
Rank 1
yan asked on 13 Aug 2010, 07:04 AM
Hi,
Thanks for your attention,I am now getting a problem with radgrid,the requirements : I use the method to keep the checkbox state,that is the selected rows state,while paging.this method can reference the url:http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html, but now,I want to the other radgrid named selectedItems,can record the former radgrid's selected rows at the same time,for example,when you selected one row of the former radgrid,the selectedItems radgrid will add the selected row;when the user cancel selected row,the selectedItems will remove the row;when the user select the all selected button(in the header of the grid which can control the current page's rows),the selectedItems radgrid control will add the whole selected rows in time,what should I do now?another question is,if the former radgrid contans [ "id","name""sex"],but the selectedItems contains the["id","name","address"],here,we suppose the id is the keyname,and an item contains fields:["id","name","sex","address"],
the former radgrid control's record :

          id         name     sex
   '1001'  'Tony' 'male'
     '1002 '    'Suny'     'female'

now,When I select the fist row,id is '1001',then the following selectedItems will add the row:

         id          name      address
   '1001'  'Tony'  'Shanghai,China'

of couse,when I re-select the former radgrid's row,with the id is '1001' ,the selectedItems will remove it accordingly.Please had better not use the session,if you think the session is available,please account for that,I am a rookie,Thanks!

3 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 19 Aug 2010, 08:03 AM
Hello Yan,

I have followed your scenario and prepared a sample project for you implementing the desired functionality. You can find it attached to this message.

Please, take a look at it and let me know whether it helps.

All the best,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
yan
Top achievements
Rank 1
answered on 20 Aug 2010, 08:46 AM
Hi,
Thanks for your help,with your kindness,I have already solve the problem.
0
omer
Top achievements
Rank 1
answered on 08 Apr 2012, 09:49 PM
Hello Mira!


This is really amazing example which i looking for it.
Thank very much you for this. 

I've a question. 
I need remove row from radgrid2 and uncheck this row in radgrid1 when user checked added row on radgrid2.
Maybe storing to session selected value is better?
and Also i need send all of selected rows of radgrid2 to another page..
Can you provide me starting point or any advice?

Thank you for your time and attention!

Ömer


Tags
Grid
Asked by
yan
Top achievements
Rank 1
Answers by
Mira
Telerik team
yan
Top achievements
Rank 1
omer
Top achievements
Rank 1
Share this question
or