devexpress 给GridView添加行号

先找到 此时间gridView1_CustomDrawRowIndicator

private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) {
            if (e.Info.IsRowIndicator && e.RowHandle > 0) {
                e.Info.DisplayText = (e.RowHandle + 1).ToString();
            }
        }

  

posted @ 2019-06-28 15:51  学海无涯,天道酬勤  阅读(1194)  评论(0编辑  收藏  举报