首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使mvc 4 webgrid序列号连续?

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

Stack Overflow用户
提问于 2015-07-07 10:58:11
回答 1查看 613关注 0票数 0

如何使不同页的行号连续地从第一页开始到结束页??

创建连续行号!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-07-07 11:04:52

代码语言:javascript
复制
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
-----------------------------------

-----------------------------------
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31266682

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档