I need convert to list a object with anonymous type because when i databind the gridview i get
"The data source does not support server-side data paging"
or How i can solve this?
object o = HttpRuntime.Cache[key];
if(o is ICollection)
{
//Sort Object
o = ((IQueryable)this.DataSource).AsQueryable().OrderBy(SortExpresion);
DataSource = o;
DataBind();
}
data returned from cache are ok, the problem is that i extended the gridview control and the data type of datasource is always different, and i need sort this anonymous data stored in cache and use in the gridview