How to perform Add/Edit/Delete in VirtualQueryableCollectionView.

2 posts, 0 answers
  1. Parthiv
    Parthiv avatar
    2 posts
    Member since:
    Sep 2012

    Posted 28 Apr 2016 Link to this post

    In our project, we have a requirement to show, millions of data from databas and hence we have used
    Data virtualization feature in RadGridView using VirtualQueryableCollectionView. Now loading is working
    as expected, but we have add/edit/delete functionality within grid. But that seems not working.

    Could you please provide some sample or document which can guide us to achieve this.

    Looking forward to hear you soon.

  2. Stefan Nenchev
    Stefan Nenchev avatar
    665 posts

    Posted 29 Apr 2016 Link to this post


    As mentioned in our documentation article regarding the Data Virtualization, the virtual collection is designed for ReadOnly purposes and it is not recommended to use it in scenarios where updates are required. You can add/delete items but you will have to work with the VirtualItemCount property of the VQCV(increase it in case you are adding an item) and rebind the RadGridView as well, which might not be ideal.

    var collection = this.clubsGrid.ItemsSource as VirtualQueryableCollectionView;
              collection.Add(new Club("Everton", DateTime.Now, 45000));

    Another approach would be to add/remove items from your source directly and reload the VQCV.

    Stefan Nenchev
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top