RadDataPager did not show page or allow navigation!

1 posts, 0 answers
  1. Lantu Datinh
    Lantu Datinh avatar
    16 posts
    Member since:
    Jul 2009

    Posted 18 Oct 2011 Link to this post

    Please help me to check if what's wrong with the code.
    Data is not paged.

    XAML:
    <telerikRia:RadDomainDataSource Name="OuterSource" Loaded="OnSourceLoaded" QueryName="GetPersons"
                                                     AutoLoad="True" PageSize="15">
                         <telerikRia:RadDomainDataSource.QueryParameters>
                             <telerikRia:QueryParameter ParameterName="param1" />
                             <telerikRia:QueryParameter ParameterName="param2" />
                             <telerikRia:QueryParameter ParameterName="param3" />
                             <telerikRia:QueryParameter ParameterName="param4" />
                             <telerikRia:QueryParameter ParameterName="param5" />
                         </telerikRia:RadDomainDataSource.QueryParameters>

    <telerik:RadDataPager PageSize="15" Grid.Row="2" Margin="5,0,5,0" DisplayMode="All"
                                          Source="{Binding DataView, ElementName=OuterSource}" IsTotalItemCountFixed="True" />

     <telerik:RadGridView x:Name="PersonGrid" Grid.Row="2" ItemsSource="{Binding DataView, ElementName=OuterSource}" >

    In the code behind, on OnSourceLoaded :
    RadDomainDataSource source = sender as RadDomainDataSource;
    source.DomainContext = this.domainContext;
     source.QueryParameters.Single(p => p.ParameterName == "param1").Value = " ";
    source.QueryParameters.Single(p => p.ParameterName == "param2").Value = "";
    source.QueryParameters.Single(p => p.ParameterName == "param3").Value = true;
    source.QueryParameters.Single(p => p.ParameterName == "param4").Value = false;
    source.QueryParameters.Single(p => p.ParameterName == "param5").Value = true;

    GetPersons return 99 records from 1 - 99, however, The data seems not to be paged. I cannot even press next to load the next page.
    (In generic DomainDataSource, although it did not show the number of page correctly (I bind to DomainDataSource.Data, and wonder why Rad control don't have that property) , whenever i click next, it load again the next page)
    Please check the screenshot.

    Thanks a lot for your help!
Back to Top