RadGridView and VirtualQueryableCollectionView not showing rows in second and onward chung

5 posts, 0 answers
  1. Joachim
    Joachim avatar
    3 posts
    Member since:
    Jan 2011

    Posted 19 Oct 2011 Link to this post

    Hello,

    we are currently evaluating the telerik components and following the documentation to use RadGridView with VirtualQueryableCollectionView when running in some issues. We chose a LoadSize of 10 and an initial VirtualItemCount of 100.

    We use MVVM to bind the RadDataGrid to an property which contains VirtualQueryableCollectionView:
    <telerik:RadGridView x:Name="RegistragionGridControl"
            ItemsSource="{Binding RegistrationsView}"
            SelectedItem="{Binding SelectedRegistration, Mode=TwoWay}"
            HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
            Width="Auto" Height="Auto"
            ShowGroupPanel="False"
            SelectionMode="Single" />

    The ItemsLoading-Event-Handler as well as the LoadingOperation-Callback looks the following in the ViewModel:
    private void OnRegistationsViewItemsLoading(object sender, VirtualQueryableCollectionViewItemsLoadingEventArgs loadingEventArgs)
            {
                if (SelectedDialog == null)
                    return;
     
                IsBusy = true;
                RegistationService.FindRegistrationsForDialog(op => OnLoadRegistrationsCompleted(op, loadingEventArgs),
                                                              SelectedDialog.Slug,
                                                              loadingEventArgs.StartIndex,
                                                              loadingEventArgs.ItemCount);
            }
     
            private void OnLoadRegistrationsCompleted(LoadOperation<ME.Registration> op, VirtualQueryableCollectionViewItemsLoadingEventArgs loadingEventArgs)
            {
                if (op.TotalEntityCount != -1 && op.TotalEntityCount != RegistrationsView.VirtualItemCount)
                    RegistrationsView.VirtualItemCount = op.TotalEntityCount;
     
                if (op.HasError)
                {
                    // TODO: handle errors
                    op.MarkErrorAsHandled();
                }
                else if (!op.IsCanceled)
                {
                    var dynamicBuilder = new DynamicRegistrationBuilder(SelectedDialog);
                    var dynamicRegistrations = op.Entities.Select(r => dynamicBuilder.CreateDynamicRegistrationInstance(r));
     
                    RegistrationsView.Load(loadingEventArgs.StartIndex, dynamicRegistrations);
                }
     
                IsBusy = false;
            }

    On our initial GridView approx. 60 rows are initially visible. So the ItemsLoading-Handler is called multiple times. Returns every time the full LoadSize and the same TotalEntityCount. But now only the first chunk of entities (10 rows) are visible in view mode.

    Strangly the rest of the entities are somehow in the grid. The SelectedItem-Property gets updated and even if i go to a column an change to the edit mode, the real value gets revealed. See the attached screenshot. Even if I scroll the data gets loaded for the right index but never showed. Edit works on every column.

    So to summarize: Only the data from the first Load-Method call gets showed in the grid.

    What I'm doing wrong? What to do to fix it?
    Best regards
    ---
    Joachim


  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 21 Oct 2011 Link to this post

    Hi Joachim,

     Can you post more info about the grid version? Is it our latest official Q2 2011 SP1? You can try also your scenario with our just released Q3 2011 Beta. 

    Greetings,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Joachim
    Joachim avatar
    3 posts
    Member since:
    Jan 2011

    Posted 21 Oct 2011 Link to this post

    Hello,

    thank you for your reply.

    When I reported the issue we used Q2 2011 SP1 Trial downloaded 1 or 2 weeks ago. I now upgraded to Q3 2011 Beta (nice, painless upgrading process). The problem persists an even worse now even not the first chunck of data is displayed correctly (See attached screenshot).

    What can I possibly doing wrong? Or is that a bug?
    Regards
    ---
    Joachim
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 21 Oct 2011 Link to this post

    Hello Joachim,

     Please open support ticket and send us an example project where we can replicate and debug the problem. 

    Regards,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  5. Joachim
    Joachim avatar
    3 posts
    Member since:
    Jan 2011

    Posted 22 Oct 2011 Link to this post

    Okay,

    I did file a bug report.
    Thank you.
    ---
    Joachim
Back to Top