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

Problem With RadDataPager & VirtualQueryableCollectionView

4 Answers 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pongsathon
Top achievements
Rank 1
Pongsathon asked on 06 Jan 2012, 06:00 AM
I am working with Telerik WPF controls, RadGridView, RadDataPager and VirtualQueryableCollectionView<T>.
The PageCount of RadDataPager is incorrect once i filtered the data via RadGridView header. The PageCount  is  
always 1.  please find attached image screenshot.

I do not know how to fix this issue. In following code, i set the VirtualItemCount value as new value but the RadDataPager show me 1 as PageCount. I could not move to next page.  

Assembly version is: 2011.3.1220.40

  <telerik:RadGridView x:Name="GridView" ItemsSource="{Binding DataView}" Width="700" MinHeight="386" MaxHeight="500"
                .........
</telerik:RadGridView>
 
<telerik:RadDataPager PageSize="100" Grid.Row="1" Source="{Binding DataView}"  />


 
public VirtualQueryableCollectionView<VSOEChageItemViewModel> DataView
     {
         get
         {
             if (_DataView == null)
             {
                 _DataView = new VirtualQueryableCollectionView<VSOEChageItemViewModel>() { LoadSize = 40, VirtualItemCount = 40 };
                 _DataView.ItemsLoading += DataViewItemsLoading;
             }
             return _DataView;
         }
         private set
         {
             if (_DataView != null)
             {
                 _DataView.ItemsLoading -= DataViewItemsLoading;
             }
 
             _DataView = value;
 
             if (_DataView != null)
             {
                 _DataView.ItemsLoading += DataViewItemsLoading;
             }
         }
     }
private void DataViewItemsLoading(object sender, VirtualQueryableCollectionViewItemsLoadingEventArgs e)
     {
         string filertString = GetFilertString();
 
         var sort = DataView.SortDescriptors;
         var sortString = sort.ToDynamicLinq();
         if (!string.IsNullOrEmpty(sortString))
             sortString = sortString.Remove(0, sortString.IndexOf(".") + 1);
 
         int allCount = 0;
         List<VSOEChageItemViewModel> dd1 = LoadData(filertString, sortString, e.StartIndex, e.ItemCount, out allCount);
 
 
         if (allCount != DataView.VirtualItemCount)
         {
             DataView.VirtualItemCount = allCount;
         }
 
         DataView.Load(e.StartIndex, dd1);
 
     }

4 Answers, 1 is accepted

Sort by
0
Srikrishna Illendula
Top achievements
Rank 1
answered on 16 Jan 2012, 03:59 AM
I have the same problem. Telerik support team, Could you please help on this?
0
Vlad
Telerik team
answered on 16 Jan 2012, 05:31 PM
Hi,

 It seems you've posted exactly the same in this thread. Are you using two accounts? 

All the best,
Vlad
the Telerik team

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

0
Srikrishna Illendula
Top achievements
Rank 1
answered on 17 Jan 2012, 05:02 AM
Yes(no), the first one is trail account and other one is paid account.

I(employee) post(from trail account) but did **not** get any response from Telerik suuport in the thread.
I ask my boss to create support ticket(from paid account). This is reason why i post the same thing in 2 thread.

Could you help me on this the problem?
0
Vlad
Telerik team
answered on 17 Jan 2012, 08:24 AM
Hi,

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

Regards,
Vlad
the Telerik team

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

Tags
GridView
Asked by
Pongsathon
Top achievements
Rank 1
Answers by
Srikrishna Illendula
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or