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

Keeping items selected on other pages with RadGridView

2 Answers 61 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Adrien
Top achievements
Rank 1
Adrien asked on 21 Jun 2016, 09:16 AM

Hello,

 

I am using a RadGridView with a RadDataPager to display a collection of items.

I use a GridViewSelectColumn to enable to select some of these items and to perform actions only on those who are selected.

My issue is that when I check the GridViewSelectColumn of some items, if I change the page and that I go back to the previous one, the items are not selected anymore.

I searched the forum and tried a few things but nothing worked.

 

Thanks in advance.

Regards,
Adrien.

2 Answers, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 21 Jun 2016, 03:18 PM
Hello Adrien,

The selected items are not retained as when the GridView is being paged by the pager, it is aware of the current page only. You could, however, handle the PageIndexChanging and PageIndexChanged events and use a separate collection in which to hold your selected items.

Please let me know if this approach would work for you.

Regards,
Dilyan Traykov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Adrien
Top achievements
Rank 1
answered on 22 Jun 2016, 08:01 AM

I already tried this but it didn't worked because it seems that the SelectedItems collection is emptied after the PageIndexChanged event. However, I searched for an event that fires after and I finally found that DataLoaded is working fine for this task.

Thanks for your help!

Adrien.

Tags
GridView
Asked by
Adrien
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Adrien
Top achievements
Rank 1
Share this question
or