【发布时间】:2014-12-15 10:13:10
【问题描述】:
我有一个DataGridView,它引用了应用程序图上的对象。出于某种原因,当我通过拖放在图表上添加曲线时,单元格不会更新。当我悬停数据DataGridView 的单元格时,会执行一些神秘的代码。我在DataGridView 触发的每个事件上都设置了一个断点,但我找不到任何东西。如果我一步一步调试,调用堆栈会显示External code。以下是我关注的事件:
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
private void dataGridView1_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)
private void dataGridView1_SelectionChanged(object sender, EventArgs e)
private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e)
private void dataGridView1_CurrentCellDirtyStateChanged(object sender, EventArgs e)
private void dataGridView1_RowContextMenuStripNeeded(object sender, DataGridViewRowContextMenuStripNeededEventArgs e)
private void dataGridView1_MouseDown(object sender, MouseEventArgs e)
DataSource 设置好了,这会是罪魁祸首吗?
如何进行更多调查?
【问题讨论】:
-
@t3chb0t 不不,这不是我想做的,我会尝试重新制定
-
你设置为DataGridView的DataSource的对象是什么类型的?
-
@Junaith 这是
BindingList -
BindingList 元素的类型是什么?它是否正确实现了 INotifyPropertyChanged?
标签: c# datagridview