DEV控件Grid的显示行号需要通过一个事件来设置,具体设置代码为:
private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
{
if (e.Info.IsRowIndicator && e.RowHandle >= )
{
e.Info.DisplayText = Convert.ToString(e.RowHandle + );
}
}
若行号显示不全,可设置gridview中indicatorWidth属性值的大小