我想在我的Silverlight
应用程序中实现服务器端分页。为了了解我需要的步骤,我经历了custom paging in asp.net
他们描述了如何设计SQL
查询以根据Page Requested
和Total no of records per page
返回结果的文章。然而,我对如何从Silverlight应用程序调用它感到困惑。就像我将如何在c#
代码中指定它一样。
使用DataPager
的默认分页非常简单。
PagedCollectionView pagingCollection = new PagedCollectionView(e.Result); //e.Result contains `List` returned by the method that calls the stored procedure GetProducts
pagerProductGrids.Source = pagingCollection;
gridProductGrid.ItemsSource = pagingCollection;
但我对自己做这件事的程序一无所知。就像get
和set
Page Size
,total no of records
等所需要的属性一样,即我如何配置DataGrid
和{{1}传递DataPager
和StartingRowIndex
请帮忙!
答案 0 :(得分:0)