Click here to Skip to main content
15,921,295 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i have datatable, which i display as partialview

i have used model ,

List<products> promodel = GetProductsModel(dtTemp);

pageSize=25;

//page= this will come when page 1 2 3 4 5 is clicked..

pageNumber = page;

return PartialView(promodel.ToPagedList(pageNumber, pageSize));

this works ok.. but i also have filtering values . sort by rating,sort by price..

so what i want is , if a user clicks on 2 page , and then sort filtering by rating, it should filter values in only 2nd page..

so how to get

is there any way to get promodel.ToPagedList(pageNumber, pageSize value into datatable so i can diectly sort datatable with preused page number

i hope you understood
Posted
Updated 19-Jun-14 18:00pm
v2

1 solution

You should use LINQ to do your sort filtering tasks, and also the pagination logic.

In my next article you have example (including the full source code) of doing all of these: MVC Basic Site: Step 4 – jqGrid Integration in MVC 4.0 using AJAX, JSON, jQuery, LINQ, and Serialization[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900