How to customize aspxgridviewpager?
-
31-05-2021 - |
سؤال
Currently i wish to use wcf get the data and bind it into aspxgridview but the DataServiceConfiguration had set the paged query----> config.SetEntitySetPageSize("", 10); so every time i will only get maximum 10 records only. isn't possible to customize the aspxgridviewpager so that it know the total record in database and only retrieve the current page record from wcf? example : i have 100000 records i had set config.SetEntitySetPageSize("", 10); when i bind to aspxgridview, the gridview will display it has 10000pages and retrieve the current page record only which is 10 records only. i had tried to use wcfservermodesource but it will not show data when config.SetEntitySetPageSize("*", 10); had be setted... so i change to customize the aspxgridviewpager.... Isn't possible to do it? thx...
المحلول
DevExpress recommended way to achieve this is implementing IListServer
interface.
WCF implementation is WcfServerModeSource. There is an example built for Windows Forms but you should be able to apply it to ASP.NET also. I'm a bit confused because of class location (DevExpress.Xpf.Core
). However, you should contact DevExpress support in order to clear if ASP.NET support WcfServerModeSource
.
Also, take a look at:
- IListServer / ServerMode overview - WPF docs - should apply to ASP.NET as well
- Server side data management - seems to me that this article lacks info about EntityServerModeSource and WcfServerModeSource.
- A possible implementation of IListServer interface to achieve Server Mode functionality
- LINQ server mode
- Tickets regarding WCF and IListServer in DevEx support.
If you choose to implement this functionality without IListServer
, you could loose a big part of ASPxGridView
functionality.