GRIDVIEW DATABING 自动行号

来源:互联网 发布:网络视频监控原理 编辑:程序博客网 时间:2024/06/03 02:44

 if (e.Row.RowIndex != -1)
        {
            int id = e.Row.RowIndex + 1;
            e.Row.Cells[0].Text = id.ToString();
        }