DEV gridView显示行号

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

同时在load函数中加上这么一句:

gridView.IndicatorWidth = 40;
显示效果如下:

DEV gridView显示行号

DEV gridView显示行号

上一篇:CAD中3D建模旋转rev命令怎么使用?


下一篇:Mule ESB-Content-Based Routing Tutorial(1)