This question is locked. New answers and comments are not allowed.
Hi everyone,
I built a asp.net mvc application and grid telerik. I used custom server binding like this demo http://demos.telerik.com/aspnet-mvc/grid/customserverbinding but I don't use Linq to SQL model. I use Entity framework and I have a problem in paging. In Entity framework, I have to order before use skip method. So I'll lost sorting result when I paging.
This paging method in demo
Many thanks.
I built a asp.net mvc application and grid telerik. I used custom server binding like this demo http://demos.telerik.com/aspnet-mvc/grid/customserverbinding but I don't use Linq to SQL model. I use Entity framework and I have a problem in paging. In Entity framework, I have to order before use skip method. So I'll lost sorting result when I paging.
This paging method in demo
I'll get error unless orderby before skip method. Can anyone help me this problem in Entity Framwork?publicstaticIQueryable<Order> ApplyPaging(thisIQueryable<Order> data,intcurrentPage,intpageSize){if(pageSize > 0 && currentPage > 0){data = data.Skip((currentPage - 1) * pageSize);}data = data.Take(pageSize);returndata;}
Many thanks.