[英]C# Winform DataGridView New added row value
如何检索新行的值? 我可以使用哪个动作/事件来获取这些值?
(e.Row.Cells["COLUMN NAME"].Value.ToString());
如果我了解您想要检索 DataGridView 的单元格的内容,一个示例并使用事件 rowValidated,请参见下面的示例。
private void dataGridView1_RowValidated(object sender, DataGridViewCellEventArgs e)
{
if (this.dataGridView1.CurrentRow != null)
{
this.textBox1.Text = this.dataGridView1.CurrentRow.Cells["Column1"].Value.ToString();
}
}
如果你的意思是另一个,可能会解释 vooui 得到什么。
问候。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.