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(); } }