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

[Solved] Paging gridview grouped

13 Answers 346 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paloma
Top achievements
Rank 1
Paloma asked on 02 Feb 2010, 12:46 PM
Hi there,
I'm using the new Telerik RadGridView version and I'm trying to apply the paging property to a radGrid that it's grouped. When I remove the grouping xaml code, the paging code works; but when a put the grouping and the paging code, the paging code doesn't work.
Any ideas?
Thanks in advance

13 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Feb 2010, 12:58 PM
Hello,

How the grid is bound in your case? On this demo both paging and grouping works as expected:
http://demos.telerik.com/silverlight/#GridView/DomainDataSource

You can check also this demo for more info about paging:
http://demos.telerik.com/silverlight/#GridView/Paging

Best wishes,
Vlad
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Paloma
Top achievements
Rank 1
answered on 03 Feb 2010, 10:46 AM
Hi there again,
I have seen that, in the first example, you allow the user to group the results.
What I want to do is to group the results on my own (in code).
To do that I have written this code:

<

 

telerikGridView:RadGridView.GroupDescriptors>

 

 

 

<data:GroupDescriptor Member="Grupo" SortDirection="Ascending">

 

 

 

<data:GroupDescriptor.AggregateFunctions>

 

 

 

<data:CountFunction Caption="Total:" />

 

 

 

</data:GroupDescriptor.AggregateFunctions>

 

 

 

</data:GroupDescriptor>

 

 

 

</telerikGridView:RadGridView.GroupDescriptors>

 

 

 

</telerikGridView:RadGridView>

 

 

 

<pager:DataPager Grid.Row="1" Source="{Binding ItemsSource, ElementName=dgPublicados}" IsTotalItemCountFixed="True" Margin="0,5,0,5" DisplayMode="FirstLastPreviousNextNumeric" />


And in the code-behind:

 

 

QueryableCollectionView view = new QueryableCollectionView(this.ItemsSource);

 

 

 

 

 

view.PageSize = 10;

 

 

 

 

 

this.dgPublicados.ItemsSource = view;


 

private IEnumerable ItemsSource

 

 

 

 

{

 

 

 

 

 

 get

 

 

 

 

 

 {

 

 

 

 

 

 var q = from publicado in listaPublicados

 

 

 

 

 

 select new DatosGrid

 

 

 

 

 

 {

 

 

 

 

 

 Id = publicado.Id,

 

 

 

 

 

 Descripcion = publicado.Descripcion,

 

 

 

 

 

 RutaDescarga = "../../Resources/document_attachment.png",

 

 

 

 

 

 RutaDescargaPDF = GetRutaDescarga(publicado.Mime),

 

 

 

 

 

 Grupo = publicado.Grupo,

 

 

 

 

 

 Estado = publicado.Estado,

 

 

 

 

 

 Documento = publicado.Fichero,

 

 

 

 

 

 TipoMime = publicado.Mime,

 

 

 

 

 

};

 

 

 

 

 

 return ((IEnumerable)q.ToList());

 

 

 

 

 

 }

 

 

 

 

 

}

Where is the error?
Thanks in advance

 

0
zhao judi
Top achievements
Rank 1
answered on 05 Feb 2010, 08:11 AM
when you add grouping ability, the PageSize means group size other than row count anymore.
0
Accepted
Stefan Dobrev
Telerik team
answered on 08 Feb 2010, 08:49 AM
Hi Paloma,

By default RadGridView will start to page the groups themselves when grouped. If you want to page the items you can try with PagedCollectionView instead of using QueryableCollectionView.

All the best,
Stefan Dobrev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Paloma
Top achievements
Rank 1
answered on 09 Feb 2010, 10:59 AM
Hi Stefan!
I chaged the QuerayableCollectionView to a PagedCollectionView and it works perfectly,
Thank you so much
0
Moises Casusol
Top achievements
Rank 1
answered on 13 Apr 2010, 03:47 PM
Hi,
I ave the same scenario but im not using RIA or LINQ, i just got the datasource from a WCF service in a ObservableCollection and bind it to the grid but the paging and grouping doesnt work together. I changed to PagedCollectionView and i got the same result, did i miss something?
PagedCollectionView newList = new PagedCollectionView((System.Collections.IEnumerable)lpResult.ToList()); 
dgEssay.ItemsSource = lpResult; 

Best Regards,
-Moises
0
Stefan Dobrev
Telerik team
answered on 16 Apr 2010, 09:49 AM
Hello Moises,

Can you elaborate more on your scenario? What exactly is not working as expected in your scenario. Also you can look at this blog post for a sample application without RIA Services.

Greetings,
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.
0
Moises Casusol
Top achievements
Rank 1
answered on 22 Apr 2010, 05:26 PM
hi,

 Thanks for the link i was helpful!!

:D
Best Regards
-Moises
0
pat
Top achievements
Rank 1
answered on 19 Aug 2011, 12:51 AM
The second link is broken.  Do you have any simple examples of using the paging control.

Thanks,

PatC
0
Maya
Telerik team
answered on 19 Aug 2011, 07:19 AM
Hello Pat,

You may use this example for a reference instead. Furthermore, you may run through our online documentation for additional information on paging the grid.
 

Best wishes,
Maya
the Telerik team

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

0
pat
Top achievements
Rank 1
answered on 19 Aug 2011, 04:24 PM
Thanks for the info.  It seems that the second demo does not load.  I just get a blank screen. Can you please check.

PatC 
0
pat
Top achievements
Rank 1
answered on 19 Aug 2011, 04:35 PM
Thanks for the info.  It seems that the second demo does not load.  I just get a blank screen. Can you please check.  Also as per another post, it seems that if you switch to PagedCollectionView as your data source then then item paging works after the grouping.

Thanks.

PatC 
0
Maya
Telerik team
answered on 25 Aug 2011, 09:11 AM
Hi Pat,

The example for paging may be found in our demos - RadGridView -> Performance -> Paging Large Data. I have tested the link posted above and everything works as expected on my side. Are you still not capable of finding the example ? 
Considering the next issue, as mentioned previously, RadGridView pages through the groups by default. Paging the items will be possible if QueryableCollectionView is used. I may recommend you to run through this and this articles for further reference on the collection.

All the best,
Maya
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
GridView
Asked by
Paloma
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Paloma
Top achievements
Rank 1
zhao judi
Top achievements
Rank 1
Stefan Dobrev
Telerik team
Moises Casusol
Top achievements
Rank 1
pat
Top achievements
Rank 1
Maya
Telerik team
Share this question
or