Grid requests all virtual pages between two selected rows

6 posts, 0 answers
  1. Yuliya
    Yuliya avatar
    11 posts
    Member since:
    Feb 2014

    Posted 20 Aug 2014 Link to this post

    Hi guys,

    I get the following issue on the version 2014.2.0617.45:

    When I select one row on top of the grid, then scroll down, and try to select other row - all the pages in between are getting loaded. The issue haven't reproduced on earlier version (2013.2.724.40).

    Here is the code to reproduce the problem:
    View:

    <Window x:Class="RadGridView_Virtualization.MainWindow"
            xmlns:local="clr-namespace:RadGridView_Virtualization"
            Title="MainWindow" Height="350" Width="525">
        <Window.Resources>
            <local:MyViewModel x:Key="MyViewModel" />
        </Window.Resources>
             
        <Grid DataContext="{StaticResource MyViewModel}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <telerik:RadGridView x:Name="gridAccessList"
                                  Height="240"
                                  Width="370"
                                 IsFilteringAllowed="False" CanUserReorderColumns="True"
                                  AutoGenerateColumns="False"
                                  ItemsSource="{Binding Path=Items}"
                                 EnableRowVirtualization="True"
                                 SelectionMode="Extended"
                                 ScrollViewer.IsDeferredScrollingEnabled="True" IsReadOnly="True"
                                 ShowGroupPanel="False">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}"
                                                                Width="*"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        </Grid>
    </Window>

    ViewModel:

    using System.Collections.Generic;
    using System.ComponentModel;
    using Telerik.Windows.Data;
     
    namespace RadGridView_Virtualization
    {
        public class MyViewModel : INotifyPropertyChanged
        {
            public event PropertyChangedEventHandler PropertyChanged;
     
            public MyViewModel()
            {
                Items = new VirtualQueryableCollectionView<DummyData>
                  {
                    VirtualItemCount = LoadSize, LoadSize = this.LoadSize
                  };
     
              Items.ItemsLoading += OnItemsLoading;
            }
     
        private void OnItemsLoading(object sender, VirtualQueryableCollectionViewItemsLoadingEventArgs args)
        {
          Items.VirtualItemCount = 35000;
     
          Source = new List<DummyData>();
     
          for (int i = 0; i < args.ItemCount; i++)
          {
            Source.Add(new DummyData { Id = args.StartIndex + i });
          }
     
          Items.Load(args.StartIndex, Source);
        }
     
          private List<DummyData> source;
            public List<DummyData> Source
            {
                get { return this.source; }
                set { this.source = value; }
            }
     
            private int loadSize = 100;
            public int LoadSize
            {
                get { return loadSize; }
                set { loadSize = value; }
            }
     
            public VirtualQueryableCollectionView<DummyData> Items { get; private set; }
     
            public class DummyData
            {
                public int Id { get; set; }
            }
        }
    }

    If you put a breakpoint in OnItemsLoading method - you'll see that grid requests all pages between two selected rows. Please, note, that it happens after regular single row selection, so no data pages in the middle of two selected rows are not needed.
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 25 Aug 2014 Link to this post

    Hi Yulia,

    Thank you for the provided information. We were able to reproduce the problem. I will post in this thread as soon as I have any further information on the matter. 


    Regards,
    Nik
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. Mads
    Mads  avatar
    1 posts
    Member since:
    Mar 2014

    Posted 18 Sep 2014 in reply to Nick Link to this post

    Hi Nik

    Is there any updates on this issue?
  4. Nick
    Admin
    Nick avatar
    593 posts

    Posted 19 Sep 2014 Link to this post

    Hi Mads,

    We have still not found the exact cause of the problem. It is Reproducable only when the selection mode of RadGridView is Extended. We are working on pin pointing the exact problem, and will post as soon as there is any progress on the matter. 

    Regards,
    Nik
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  5. Yuliya
    Yuliya avatar
    11 posts
    Member since:
    Feb 2014

    Posted 17 Dec 2014 Link to this post

    Hi, Nick,

    Is there any progress with the specified problem?
    I've also noticed similar issue with Shift-selection between multiple pages: the data is loaded  twice! So, when I select some row, then scroll down to the grid, and close selection with Shift - all the pages between selected rows are retrieved twice.

    I've checked both this issues on version 2013.2.724.40 - none of them existed.
  6. Nick
    Admin
    Nick avatar
    593 posts

    Posted 19 Dec 2014 Link to this post

    Hi Yulia,

    The issue is still not resolved. You can track the progress in our feedback portal.

    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top