Hi,
I am trying to develop an dll using infragistics (C#.net). Am stuck at a point where i need to trigger a EditorButtonClick in exe from my Dll. I will be knowing the button key which needs to be triggered, But am not clear on how to develop the event which will trigger the EditorButtonClick.
Can anyone please help me with this.
Thanks in advance.
Regards,
Prasad
Hi Prasad,
Thank you for posting in our forums.
Maybe I am missing something, but your requirement is not really clear to me. Do you want to subscribe to the event? Then you can use the following code:
editor.EditorButtonClick += editor_EditorButtonClick;
and then create the editor_EditorButtonClick method with the proper parameters (you can use VS to create it for you). Or do you want to call the functionality inside the event? Then I would suggest moving this functionality in a separate method and then calling this method when needed.
Let me know if this helps you solve your issue and please clarify what exactly your goal is.
I am looking forward to hearing from you.
Hi Dimitar,
Thanks for responding.
I have a DLL developed with infragistics. This DLL is supposed to invoke a EditorButton present in the exe which calls this dll.
Exe Editor Button Code:
private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { if (e.Button.Key == "Search") { MessageBox.Show("Hello"); } }
I want to invoke this button click from the dll which am developing.
Basically the message should popup, when i trigger an event in my DLL.
Hope its clear now. If you need more details please let me know.
Looking forward for your advice.
Thank you for the clarification.
So you basically want to invoke the code in the editor button click event from another dll programmatically, without clicking on the button? If the event isn’t exposed to you, i.e it is private, I don’t think it is possible, at least without using reflection. The better option would be to change the other dll to add the logic in the EditorButtonClick event in a public method and to call this method instead.
Please let me know if you have any additional questions.
Hello Prasad,
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.