Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.Net:DataGridView响应IBinding.ListChanged但未响应CellValueChanged事件处理程序_.net_Events_Datagridview - Fatal编程技术网

.Net:DataGridView响应IBinding.ListChanged但未响应CellValueChanged事件处理程序

.Net:DataGridView响应IBinding.ListChanged但未响应CellValueChanged事件处理程序,.net,events,datagridview,.net,Events,Datagridview,我有一个自定义IBinding列表,它引发ListChanged事件。我想在ListChanged事件之后重新调用Datagridview行 Datagridview正在响应ListChanged事件并更改单元格值,但从未触发CellValueChanged事件 哪个Datagridview事件反映ListChanged事件 类客户列表:IBinding Public Sub UpdateList(Byval index as Integer) List(index).Active =

我有一个自定义IBinding列表,它引发ListChanged事件。我想在ListChanged事件之后重新调用Datagridview行

Datagridview正在响应ListChanged事件并更改单元格值,但从未触发CellValueChanged事件

哪个Datagridview事件反映ListChanged事件

类客户列表:IBinding

Public Sub UpdateList(Byval index as Integer)
     List(index).Active = true
     RaiseEvent ListChanged(Me, _
        New System.ComponentModel.ListChangedEventArgs _
        (System.ComponentModel.ListChangedType.ItemChanged, index))
End Sub
类CustomDataGridView:DataGridView

Private Sub Grid_CellValueChanged(ByVal sender As Object, _
            ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) _
            Handles Me.CellValueChanged
     ColorRow(Rows(e.RowIndex)) ''//NeverFires
End Sub
类别:表格

Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
                Handles Me.Load

        Dim customList As New CustomList()
        customList.add(new CustomItem())
        dgv.DataSource = customList
        customList.UpdateList(0) ''//DatagridView updates but no event is raised

End Sub
更新:

CellValueChanged事件仅在 新值将从DGV推送到 DT。不是相反


–应在RowPrePaint事件中更改单元格背景颜色,如果在值更改后重新绘制行,将触发此操作。

应在RowPrePaint事件中更改单元格背景颜色,如果在值更改后重新绘制行,将触发此操作