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
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.
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
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.
I chaged the QuerayableCollectionView to a PagedCollectionView and it works perfectly,
Thank you so much
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
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.
Thanks for the link i was helpful!!
:D
Best Regards
-Moises
Thanks,
PatC
You may use this example for a reference instead. Furthermore, you may run through our online documentation for additional information on paging the grid.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
PatC
Thanks.
PatC
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.
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 >>
