WinForm------GridControl显示每行的Indicator中的行号

1.修改Indicator的行宽

 

2.添加CustomDrawRowIndicator事件

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

 

3.完成

 

posted @ 2016-08-17 16:12  玉天恒  阅读(1217)  评论(0编辑  收藏  举报