i从我的服务器下载数据并使用DataGridView
介绍结果。添加新的行后,我希望我的程序显示信号。我该怎么做?
订阅DataGridView.RowsAdded
事件。
dataGridView1.RowsAdded += new DataGridViewRowsAddedEventHandler(dataGridView1_RowsAdded);
void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
// show the signal
}
您需要使用UserAddedrow事件,当激活该事件时,您可以使用它来发送 像true或false这样的布尔人喜欢这个示例
private void usersDGV_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
//this event occurs when user added new row to the datagridview
//and will turn the boolean newRowAdded on.
newRowAdded = true;
}