This question is locked. New answers and comments are not allowed.
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:
The ItemsLoading-Event-Handler as well as the LoadingOperation-Callback looks the following in the ViewModel:
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
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
