Winforms 没有在DataGridView上添加新行
与这个问题类似,我使用的是绑定源代码,但我没有像上面问题的屏幕截图那样直观地看到带有*的添加新行。我可以选择一行并按delete按钮,它会删除ok,只是不能以交互方式添加新行。我做错了什么 注意:我的专栏是在设计时创建的 加载数据的代码如下所示:Winforms 没有在DataGridView上添加新行,winforms,datagridview,vb.net-2010,Winforms,Datagridview,Vb.net 2010,与这个问题类似,我使用的是绑定源代码,但我没有像上面问题的屏幕截图那样直观地看到带有*的添加新行。我可以选择一行并按delete按钮,它会删除ok,只是不能以交互方式添加新行。我做错了什么 注意:我的专栏是在设计时创建的 加载数据的代码如下所示: Private bindingSource1 As New BindingSource Private Sub LoadDeploymentNotes(ByVal items As List(Of DeploymentNote)) DataGr
Private bindingSource1 As New BindingSource
Private Sub LoadDeploymentNotes(ByVal items As List(Of DeploymentNote))
DataGridView1.AutoGenerateColumns = False
Dim column = CType(DataGridView1.Columns("ColumnChange"), DataGridViewComboBoxColumn)
column.DataSource = [Enum].GetValues(GetType(Change))
bindingSource1.DataSource = items
DataGridView1.DataSource = bindingSource1
DataGridView1.Refresh()
End Sub
Gosh在我的类DeloymentNote中需要一个没有收到任何参数的构造函数