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

How to do paging in Silverlight Data Grid

5 Answers 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
eraashishgupta
Top achievements
Rank 1
eraashishgupta asked on 06 Apr 2010, 07:30 AM
Hi all,
I am using a domain data source with RIA services, also using the Telerik Silverlight Studio Q3 2009 SP1.
I am unable to find any property on the grid view by which i can do the paging , i also tried the loadSize and PageSize property in the domain datasource and also tried introducing a DataPager control but no luck yet.

I know that the new Silverlight Studio gridview ships with the new paging functionality with DataPager but at the current time i cannot update the dll to the new version do you think that the version of the Silverlight Studio which i am using also have the datapaging functionality.

Thanks for your help.
Aashish Gupta
www.smallworkarounds.net
www.effectlabs.com

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Apr 2010, 07:43 AM
Hello,

There is no problem to use RadGridView Q3 2009 with regular DataPager - you can check our demo for reference.

Best wishes,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
eraashishgupta
Top achievements
Rank 1
answered on 06 Apr 2010, 08:15 AM
Hi ,
I am not getting RadDataPager as shown in the example i only get two options GridViewToggleButton and RadGridView using this
xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"

So where can i get the RadDataPager

Thanks,



0
Vlad
Telerik team
answered on 06 Apr 2010, 08:40 AM
Hi,

As I said in my previous reply you can use regular DataPager if you do not have RadDataPager. RadDataPager can be found in Q1 2010.

Best wishes,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
eraashishgupta
Top achievements
Rank 1
answered on 07 Apr 2010, 08:25 AM
Hi Vlad,

I am doing it like this
<riaControls:DomainDataSource x:Name="dds1" LoadSize="10"  QueryName="GetPo_ClientInfo" AutoLoad="True"
                <riaControls:DomainDataSource.DomainContext> 
                    <App:PluggedDomainContext/> 
                </riaControls:DomainDataSource.DomainContext> 
            </riaControls:DomainDataSource> 

And now the Telerik Silverlight Grid
 <telerikGrid:RadGridView Margin="0,1,0,1"  MultipleSelect="True" telerik:Theming.Theme="Office_Silver"   
                    RowDetailsVisibilityMode="VisibleWhenSelected" RowDetailsTemplate="{StaticResource ClientInfoRowDetailsTemplate}" 
                    Name="RadGridView1" Grid.Row="1" IsFilteringAllowed="False" AutoGenerateColumns="False"  
                    ItemsSource="{Binding Data,ElementName=dds1}" IsBusy="True"
                        <telerikGrid:RadGridView.Columns> 
                            <telerikGrid:GridViewSelectColumn/> 
                            <telerikGrid:GridViewDataColumn UniqueName="Company" /> 
                            <telerikGrid:GridViewDataColumn UniqueName="FirstName" Header="First Name"/> 
                            <telerikGrid:GridViewDataColumn UniqueName="LastName" Header="Last Name" /> 
                            <telerikGrid:GridViewDataColumn UniqueName="City" /> 
                            <telerikGrid:GridViewDataColumn UniqueName="State" /> 
                            <telerikGrid:GridViewDataColumn UniqueName="PostalCode" Header="Postal Code" /> 
                        </telerikGrid:RadGridView.Columns> 
                    </telerikGrid:RadGridView> 





And the Silverlight Data Pager

 <data:DataPager x:Name="dpClients" Grid.Row="2" Source="{Binding Data,ElementName=dds1}" PageSize="5" 
                     DisplayMode="FirstLastPreviousNextNumeric" IsTotalItemCountFixed="True" AutoEllipsis="True" /> 

Lets consider that i have 20 records so my problem is my paging works fine for 1 and 2 pages as soon as i click the 3 and 4 page the page refreshes and nothing loads , i think there some problem in loadsize what i know about loadsize is that it will tell the context to fetch the no of records so if the load size is 10 it will get first 10 and when i click on the second page it will fetch nothing from the server when my data pager page size is 5, it will fetch records from the server only when i click on page 3.
Am i right ??
What is causing problem in my scenario ??
0
Stefan Dobrev
Telerik team
answered on 12 Apr 2010, 09:11 AM
Hi eraashishgupta,

Are you using Entity Framework on the server? If so you have to order by your query on the server so that the paging will work correctly. This articles explains this. Also you can read about this problem here.

Best wishes,
Stefan Dobrev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
eraashishgupta
Top achievements
Rank 1
Answers by
Vlad
Telerik team
eraashishgupta
Top achievements
Rank 1
Stefan Dobrev
Telerik team
Share this question
or