如何使mvc 4 webgrid序列号连续?

how to make mvc 4 webgrid serial number continuous?

如何让不同页面的行号从第一页开始到最后一页连续??

正在创建连续的行号!

I had faced such problem but solved already.

you have to make the index of the row number as follows;
declare a variable int rowVal=0; 

grid.Column(header: "Serial_No", format: item => rowVal = rowVal + 1 + (grid.RowsPerPage * grid.PageIndex)),

 - 

*

> (grid.RowsPerPage * grid.PageIndex) ==>  calculates the offset of the row index of the page number
-----------------------------------

-----------------------------------