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.完成