开发者

SilverLight like Datagrid Paging in WPF?

Currently I am searching for the best way for paginating the records in WPF datagrid. I have found one best article which provide best way for paginating records in Silverlight over here.

See it provides also a fabulous demo.

Here is one screen shot.

SilverLight like Datagrid Paging in WPF?

But when I have trying it to implement it in WPF I could not implement it? I could not found PagedCollectionView class and also could not found the alternative XAML code of the Silverlight code shows is below screen shot.

SilverLight like Datagrid Paging in WPF?

Could any one provide or suggest the best way for开发者_开发问答 paginating the records in WPF as like Silverlight?


You can grab the PagedCollectionView source code from here and compile it into your WPF project. I've done this for a WPF project in the past and it works just fine. However, you won't have the supporting types like DataPager, but it's easy enough just to write your own or throw some buttons on your view that page through the collection.


WPF DataGrid doesn't come with pagination by default. You have to have your own custom implementation. Here is a sample. The sample implements First/Previous as ViewModel commands, however I would advise you to move these commands as part of the control and make a custom DataGrid control that you can reuse across application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜