DevExpress GridControl显示行号;

(1) this.gridView2.IndicatorWidth = 30;//设置显示行号的列宽

(2) 设置动作grid

voidgridView2_CustomDrawRowIndicator(objectsender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
 {
 	            if(e.Info.IsRowIndicator && e.RowHandle >= 0)
 	            {
 	                e.Info.DisplayText = (e.RowHandle + 1).ToString();
 	            }
 }

 

 
   
posted @ 2013-11-21 15:04  bert.zeng  阅读(2239)  评论(0编辑  收藏  举报