GridView sorting doesn't work when I enable caching in Custome Paging and sorting

I have a GridView that uses a stored procedure for user paging and sorting.
This works fine and works fine (both swap and sort). But the problem is when I Enable Caching in ObjectDataSource, for example:

 EnableCaching="True"

It correctly caches every page the user visits. But in this case, when the user wants to sort, he throws an error (although this works fine if EnableCaching = "False":

The data source 'ObjectDataSource1' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.

what should i do to sort work when i enable caching.

Thank.

+2
source share
3

, , , , , ,   select .

, - (: ) , , - ( ) ( ). , , .

,

+2

-

http://forums.asp.net/p/1509071/3676014.aspx#3676014

URL-:

http://www.codeproject.com/KB/aspnet/GridViewObjectDataSource.aspx http://forums.asp.net/t/1344883.aspx

, ODS (Obj Data Source), ODS:

EnableCaching="True"

?

PS: , Viewstate ODS, GridView, ODS Caching on ODS.

0

Source: https://habr.com/ru/post/1732614/


All Articles