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

Cannot set property PageSize when CanLoad is false.

2 Answers 81 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Anu
Top achievements
Rank 1
Anu asked on 06 Jun 2013, 04:57 PM
i get this error when i try to load my gridview with the datapager. 
This is the code i am using... what am i doing wrong here:
Using the following version- 2013.1.403.1050

<telerik:RadDomainDataSource x:Name="DataSourceHist" QueryName="GetHist" AutoLoad="True"   >
           <telerik:RadDomainDataSource.DomainContext>
               <domain:HistContext />
           </telerik:RadDomainDataSource.DomainContext>
       </telerik:RadDomainDataSource>
   
       <telerik:RadGridView x:Name="RadGrid_History" ItemsSource="{Binding DataView, ElementName=DataSourceHist}"
                            IsBusy="{Binding IsBusy, ElementName=DataSourceHist}"
                           Grid.Row="1" RowStyleSelector="{StaticResource fileTransmissionStatusStyle1}"
                            AutoGenerateColumns="True"  SelectionUnit="Cell" SelectionMode="Extended"
                            >
          
     
       </telerik:RadGridView>
      
       <telerik:RadDataPager Grid.Row="2"
                                  x:Name="radDataPager2"
                                  PageSize="15" BorderThickness="1,0,1,1"
                                  Source="{Binding DataView, ElementName=DataSourceHist}"
                                  DisplayMode="All"
                                  AutoEllipsisMode="Both"
                                  NumericButtonCount="10"
                                  />

Domain Query:

public IQueryable<EHistrory> GetHist()
       {
         
           return this._context.EHistrories.OrderByDescending(a=> a.CreatedOn);
       }

2 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 07 Jun 2013, 11:45 AM
Hi,

We have tried to reproduce this on our First Look demo, but unfortunately we could not.

Can you try moving the PageSize setting on the RadDomainDataSource instead of the pager?

Regards,
Rossen Hristov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Anu
Top achievements
Rank 1
answered on 07 Jun 2013, 04:01 PM
it did work after moving pagesize  to RadDomainDataSource


Thanks
Tags
DataPager
Asked by
Anu
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Anu
Top achievements
Rank 1
Share this question
or