问题描述
i有数据表,我显示为部分视图
i使用的模型,
列表< products> promodel = GetProductsModel(dtTemp);
pageSize = 25;
// page =这将来当第1页2 3 4 5被点击时..
pageNumber = page;
返回PartialView( promodel.ToPagedList(pageNumber,pageSize));
这个工作正常..但我也有过滤值。按评级排序,按价格排序..
所以我想要的是,如果用户点击2页,然后按评级排序过滤,它应该过滤值仅在第2页..
所以如何获得
有没有办法获得预告。 ToPagedList(pageNumber,pageSize值到数据表中,所以我可以使用预先使用的页码对数据表进行排序
i希望你理解
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
这篇关于在mvc razor 4中将topagedlist值放入数据表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!