C# 中的事件跟踪
我想了解事件循环。 我有一个带有网格和文本框的表单。 它有一个绑定到 DataTable 的网格,也有绑定到同一个表的文本框。 我正在尝试调试某些内容,并且需要知道如何识别表单中触发的所有事件,以了解哪些事件可以为我解决问题。
无论如何,除非我明确地对表单上的每个类进行子类化,并将每个事件覆盖/附加到我自己的事件处理程序,否则我如何获取/侦听在某个操作期间触发的所有事件...例如更改“选定” DataGridView 中的道路。 它显然更新了自己的“CurrentRow”...我需要知道什么/如何强制重新加载相同的 CurrentRow。
原因:在表单级别“编辑模式”期间,我更改了另一个“文本框”控件中的内容,并拒绝更改,我需要它来模拟当前“记录”被重新加载以返回到其原始值。
I want to understand event cycles. I have a form with a grid and textboxes. It has a grid, bound to DataTable, and textboxes bound to same table too. I'm trying to debug something and need to know how to identify ALL events fired in the form to see what may solve an issue for me.
Anyhow, unless I explicitly subclass every class on my form, and override / attach to every event to my own event handlers, how can I get / listen to all events being fired during a certain action... Such as changing a "Selected" road in a DataGridView. It obviously updates its own "CurrentRow"... I need to know what / how to maybe FORCE a re-loading of SAME CurrentRow.
Reason: during a form level "Edit Mode", and I change the content in another "Textbox" control, and reject changes, I need it to simulate the current "Record" is reloaded to go back to its original values.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以启动探查器并查看方法调用树。
You could fire up a profiler and look at the method call tree.