使用绑定导航器、绑定源保存行更改的代码
当使用绑定导航器和绑定源并单击移动按钮或添加按钮或删除按钮时,绑定源会在按钮的单击处理程序(即用户代码)之前完成其操作代码,
这会阻止对行更改进行保存操作。我想找到一个绑定源挂钩,例如“beforeRowChange”。
我可以对绑定源进行子类化并在添加或删除事件之前进行操作,但这并不能涵盖所有行移动操作。
欢迎任何线索、建议。
When using a bindingNavigator and bindingSource and clicking a move button or add button or delete button, the bindingSource completes its action code before the click handler of the button (i.e. user code)
This prevents a save action on the row change. I'd like to find a bindingSource hook, something like 'beforeRowChange'.
I can subclass the bindingSource and get ahead of the add or remove event but that doesn't cover all the row move actions.
Any clues, suggestions welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
BindingNavigator 有一个名为“DeleteItem”的属性。
将此属性从“BindingNavigatorDeleteItem”更改为“(无)”。
The BindingNavigator has a property called 'DeleteItem'.
Change this property from 'BindingNavigatorDeleteItem' to '(none)'.