回复 3楼wangshw的帖子
wangshw 你好,
请参考附件:
主要是通过,pageIndex 计算当前行索引:
- int pageIndex = 0;
- protected void C1GridView1_PageIndexChanging1(object sender, C1.Web.Wijmo.Controls.C1GridView.C1GridViewPageEventArgs e)
- {
- pageIndex = this.C1GridView1.PageIndex = e.NewPageIndex;
- LoadData(1);
- }
- protected void C1GridView1_RowCreated(object sender, C1GridViewRowEventArgs e)
- {
- int index = e.Row.RowIndex;
- if (index == -1)
- {
- return;
- }
- (e.Row.FindControl("CustomLabel1") as CustomLabel).Text = (pageIndex*this.C1GridView1.PageSize+index + 1).ToString();
- }
复制代码 |