Silverlight在数据网格中的分页 [英] Pagination in data grid in Silverlight
本文介绍了Silverlight在数据网格中的分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在Silverlight中有一个按国家/地区分组的数据网格.我必须从具有...的组合框中选择一个值.
1.每页3条记录
2.每页5条记录
3.每页10条记录
当我选择每页3条记录时,它在数据网格中仅显示3行.但是我希望在页面上显示3个国家/地区,当我每页选择5条记录时,它应该显示5个国家/地区的所有记录,即基于分组的分页.
在此先谢谢!!
Hi All,
I have a data grid having group by Country in Silverlight. I have to select a value from the combo box having...
1. 3 records per page
2. 5 records per page
3. 10 records per page
When I select 3 records per page, it only shows 3 rows in the data grid. But I wanted 3 Countries to be displayed on the page and when I select 5 records per page, it should show all the records in 5 countries, i.e pagination based on grouping.
Thanks in advance!!!
推荐答案
为此,您需要编写一个适当的委托,该委托可以传递给PageCollectionView来过滤出记录,然后基于该委托调用适当的分页.
Hi,
To do this, you need to write a proper delegate which you can pass to the PageCollectionView to filter out the records and based on that, call the proper pagination.
添加到Kunal中回答, Silverlight 4 – Datagrid(排序,分组,过滤和分页)–提示一天 [ ^ ] cp的一篇文章也可能对您有所帮助.
Added to Kunal''s Answer,Silverlight 4 – Datagrid (Sorting, Grouping, Filtering and Paging) – Tip of the day[^]an article from cp might also help you.
这篇关于Silverlight在数据网格中的分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文