[英]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.