I am using the Webgrid in asp.net mvc3, and using it’s build in paging and sorting.
@{
var grid = new WebGrid(rowsPerPage: 10, ajaxUpdateContainerId: "GridDiv");
grid.Bind(source: Model);
grid.Pager(WebGridPagerModes.All);
}
The paging in the bottom shows something like this to switch between pages
1 2 3 4 5 >
When there is less then 10 rows in the model, there is only one page and the paging in the bottom disappear.
is there a way to make it show even if there is only one page?
1 >
Hope I was clear.
Thanks a lot
One quick fix would be to check the TotalRowCount and manually add links,
this definitely is not a correct way to do so, also what are you planning to do on clicks on such links? are they just empty links then this is for you.