DataGridView 序号

public void view_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
        {           
            if (e.RowHandle >= 0)
            {
                e.Info.DisplayText = (e.RowHandle + 1).ToString();
            }
            else if (e.RowHandle < 0 && e.RowHandle > -1000)
            {
                e.Info.DisplayText = "G" + e.RowHandle.ToString();
            }
        }

你可能感兴趣的:(datagridview)