ASP.NET MVC 3 WebGrid paging issue
问题 My data access layer returns collection with rows for single page and total number of rows. Unfortunately WebGrid component does not allow to specify total number of rows or total number of pages (these properties are read-only). Has anyone had to deal with this issue before? 回答1: You can use the Bind method on the WebGrid to tell the grid to use server side paging. grdv.Bind(myData, rowCount=10000, autoSortAndPage=False) Setting autoSortAndPage to false tells the grid that myData is just a