DevExpress GridControl 显示行号、设置行号宽(转)

设置行号宽

gridView1.IndicatorWidth = 30;

显示行号

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

posted on 2021-08-21 13:45  xihong  阅读(263)  评论(0编辑  收藏  举报

导航