DataGridView的DataBindingComplete事件未在第一行上启动
我有一个绑定到数据源的DataGridView。我正在捕获DataBindingComplete事件以处理一些复选框列。一切正常,除非它是网格中的第一行,在这种情况下,事件似乎不会发射。我没有处理任何其他datagridview事件,该方法简直就是:
Private Sub DataBindingComplete(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.DataGridViewBindingCompleteEventArgs) Handles _
grdMyGrid.DataBindingComplete
Dim testvar As String
testvar = "hi" 'Breakpoint is on this line
End Sub
如果我在任何行上勾选任何复选框,但是第一个断点是命中的...虽然第一行... nada。屏幕截图可能不会有很大的区别,但这就是我正在使用的...
I have a DataGridView which is bound to a datasource. I'm catching the DataBindingComplete event to handle some checkbox columns. Everything works fine unless it's the first row in the grid in which case the event does not seem to fire. I'm not handling any other datagridview events and the method is simply:
Private Sub DataBindingComplete(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.DataGridViewBindingCompleteEventArgs) Handles _
grdMyGrid.DataBindingComplete
Dim testvar As String
testvar = "hi" 'Breakpoint is on this line
End Sub
If I tick any of the checkboxes on any row but the first the breakpoint is hit... first row though... nada. Screenshot probably won't make much difference but this is what I'm working with...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论