DEV控件Grid的显示行号需要通过一个事件来设置,具体设置代码为:

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

若行号显示不全,可设置gridview中indicatorWidth属性值的大小

相关文章:

  • 2021-08-27
  • 2021-06-11
  • 2021-10-11
  • 2021-06-03
  • 2021-12-11
  • 2021-10-25
  • 2021-11-22
  • 2022-01-03
猜你喜欢
  • 2022-01-18
  • 2022-01-29
  • 2021-06-21
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
相关资源
相似解决方案