This is a migrated thread and some comments may be shown as answers.

RadGridView and VirtualQueryableCollectionView not showing rows in second and onward chung

4 Answers 176 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joachim
Top achievements
Rank 1
Joachim asked on 19 Oct 2011, 03:43 PM
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


4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Oct 2011, 09:14 AM
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 >>

0
Joachim
Top achievements
Rank 1
answered on 21 Oct 2011, 10:13 AM
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
0
Vlad
Telerik team
answered on 21 Oct 2011, 11:53 AM
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 >>

0
Joachim
Top achievements
Rank 1
answered on 22 Oct 2011, 11:33 AM
Okay,

I did file a bug report.
Thank you.
---
Joachim
Tags
GridView
Asked by
Joachim
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Joachim
Top achievements
Rank 1
Share this question
or