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...
Asked
Active
Viewed 597 times
0
1 Answers
1
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.

Filip
- 3,257
- 2
- 22
- 38
-
Actually i had tried on WcfServerModeSource it work fine without SetEntitySetPageSize("", 10);.But if SetEntitySetPageSize("", 10); the the aspxgridview will show nth..... – DevProve Apr 16 '12 at 08:48
-
Did you try to set page size using SettingsPager.PageSize ASpxGridView parameter? – Filip Apr 16 '12 at 09:13
-
i set 5 row for a page but it also show nth but it will show total page count – DevProve Apr 16 '12 at 09:16
-
What do you mean by "show nth"? Grid doesn't show first page or you have n rows in a page? – Filip Apr 16 '12 at 09:36
-
You wanted it to show 5 rows in page? As for blank, you probably have some problem with binding data to grid columns. – Filip Apr 16 '12 at 09:42
-
yes, and the DataServiceConfiguration had setted SetEntitySetPageSize("", 10); so i will load 2 pages... i'm sure that is no problem on the columns.. if i remove the SetEntitySetPageSize("", 10); then everything is alright. – DevProve Apr 16 '12 at 09:48
-
Why do you need SetEntitySetPageSize if WcfServerModeSource handles paging? – Filip Apr 16 '12 at 09:51
-
Thats not mine decision.... because scare of the webserver down when other ppl direct query all the records... – DevProve Apr 16 '12 at 09:54
-
Yes, but that way ASPxgridView doesn't get all data needed to correctly handle grid paging. You should choose between available options. Or try opening ticket in DevEx support and see if they have some other idea. – Filip Apr 16 '12 at 10:03
-
What do you mean by "available options"? Is there any other options? – DevProve Apr 16 '12 at 10:07
-
1Option 1: Remove SetEntitySetPageSize, Option 2: First answer you received. I don't know if this can be solved with option 2. I advice you to remove SetEntitySetPageSize or try with DevEx support. – Filip Apr 16 '12 at 10:22