Select row in a GridView with virtualized data

2 posts, 0 answers
  1. Matt1234
    Matt1234 avatar
    13 posts
    Member since:
    Nov 2009

    Posted 19 Aug Link to this post


    I'm using a GridView with data bound via VirtualQueryableCollectionView (like in this example:


    When a user double clicks a row, I show a detail form and after the user is done editing and closes the form, I reload the data to reflect the changes made by this and other users.


    After loading the data, I would like to highlight the row the user just edited.


    When the GridView is bound do a normal list of data, I can easily do that by querying for the object in the loaded data and then setting

    gridView.SelectedItem = x

    but since switching to the VirtualQueryableCollectionView, this doesn't work any more.


    Is there any way to select a data item / row in a GridView that uses VirtualQueryableCollectionView as DataContext?


  2. Martin Vatev
    Martin Vatev avatar
    73 posts

    Posted 23 Aug Link to this post

    Hi Matthias,

    To achieve the desired behavior you need to make sure that the item you want to select is already loaded.
    You can take a look at these two forum threads(thread1, thread2) where you can find more information on the matter.

    Martin Vatev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top