Keeping items selected on other pages with RadGridView

3 posts, 1 answers
  1. Adrien
    Adrien avatar
    2 posts
    Member since:
    Jul 2014

    Posted 21 Jun Link to this post

    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. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    368 posts

    Posted 21 Jun Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Adrien
    Adrien avatar
    2 posts
    Member since:
    Jul 2014

    Posted 22 Jun in reply to Dilyan Traykov Link to this post

    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.

Back to Top