I currently have a repeater whose datasource is a List where ModelObject is a custom class in the front-end used to help render the more complex LINQ to SQL object. For example, it renders URLS for links, names of statuses, etc.. The status names are not in the database because we knew we'd have to localize this app someday.
Now I need to page and sort this list so I'm trying to switch to a gridview to take advantage of the out of the box functionality. I get the error "The data source does not support server-side data paging". What kind of datasource can I use that will still allow my front-end to customize the output? This seems it should be a common task because apps that are localized need the sort values coming out of the resx files.
Thanks for your help.
You can't use an IQueryable object to data bind to a GridView and still use Paging and Sorting. You must return a List to the GridView using the ToList() method.
See this DevToolShed Article for more information:
http://www.devtoolshed.com/content/gridview-objectdatasource-linq-paging-and-sorting
For those that are getting this error but implementing:
IEnumerable<T> or
IEnumerable or
IList<T> or
IDictionary<T1, T2>.
You need to implement ICollection (the non-generic one) for you to get passed the "The data source does not support server-side data paging" error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With