Hi,
I need to check on runtime if a specific method is hooked up to the grids CellChange event. How can i do that? It seems as if i have to use reflection to get this information, but unfortunately i do not get it via this code, because eventField is null:
Type classType = tree.GetType();FieldInfo eventField = classType.GetField( "CellChange", BindingFlags.GetField | BindingFlags.NonPublic | BindingFlags.Instance);
EventHandler eventDelegate = (EventHandler)eventField.GetValue(myGrid);if (eventDelegate != null){ Delegate[] allDelegates = eventDelegate.GetInvocationList();
....
}
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components.
Hello,
UltraGrid uses EventHandlerDictionary and EventManager to add/remove the events, so the delegates are values of this dictionary which is protected and it comes from ControlBase class. So there are no public property exposed to access the delegate of specific event, but if you want you could use EventManager in order to enable/disable all events or specific one. For more information please review the following link:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v11.1~Infragistics.Win.UltraWinGrid.UltraDropDown~EventManager.html
please let me know if you have any further questions.