gridView1.IndicatorWidth=30; //设置行号宽度

//对gridView1的CustomDrawRowIndicator事件进行操作 进行行号显示

private static void GridView1_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
{
    if (e.Info.IsRowIndicator && e.RowHandle >= 0)
    {
        e.Info.DisplayText = (e.RowHandle + 1).ToString();
    }
}

05-11 16:53