在最后一栏

时间:2017-02-22 18:26:50

标签: c#

在Datagridview中,我想要在RowPostPaint方法中使用以下代码的序列号或行号

'private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
    {
        this.dataGridView1.Rows[e.RowIndex].Cells["SlNo"].Value = (e.RowIndex + 1).ToString();
    }'

我得到的序列号或行号是第一列,但我想要它在我的datagridview的最后一列,所以如何做到这一点。 请帮帮我

谢谢

0 个答案:

没有答案
相关问题