开发者

C# Winform DataGridView New added row value

How can I retrieve the value of a new row? Whi开发者_开发百科ch action/event can I use to get these values?

(e.Row.Cells["COLUMN NAME"].Value.ToString());


if I understand you want to retrieve the contents of a cell of the DataGridView, an example and use the event rowValidated, see example below.

         private void dataGridView1_RowValidated(object sender, DataGridViewCellEventArgs e)
        {
            if (this.dataGridView1.CurrentRow != null)
            {
                this.textBox1.Text = this.dataGridView1.CurrentRow.Cells["Column1"].Value.ToString();
            }
        }

If you mean another, possibly explaining what vouoi get.

Regards.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜