I'm using DockableControlPane. I have added a control on it, which has some radio buttons.
I have added radio button click event to perform some operations on clicking radio buttons.
I'm calling DockableControlPane.FlyOut on load.
Here the radio button click event is also firing. This is not expected behavior.
I want to only flyout the dock panel. It should not fire control click event.
Can you please help me with this.
Thank you for contacting. I created a sample application with the help of the code you provided and able to reproduce the behavior you described.
But in order to understand the issue I removed all the code related to Infragistics controls and find the radio button click event is still fired, and this is what an expected behavior .
Here I attached the sample application I used to test this behavior.
Please let me know if you need further assistance.
Sincerely,Divya JainAssociate Software Developer
Thanks for the reply.
Radio button click event fires on clicking it or setting any value. But why is it firing on dock panel Flyout() as well?
Thank you for the update. I try to explain what is happening here , when you hover the unpin tab, it essentially calls Flyout() just like the button, however, only the button's call is causing the event on the radiobutton to fire.
Why it is so, its because when you call Flyout(true), the UltraDockManager attempts to activate the docked control, this gives focus the active control within the UserControl (which is the RadioButton). When a radiobutton gains focus, it fires the click event.
So to prevent this from occurring you need to flyout the pane without activating the child control, this is done by calling Flyout(true, false). , by setting 2nd parameter false tells the UltraDockManager not to force the docked control to be active and fire that event.
However, when you do this, it will most likely cause the pane to close again. To handle it you will have to go back to forcing the control to be active and then making sure there is a different active control on the UserControl that has focus prior to calling Flyout or make the RadioButton_Click processing smart enough to handle multiple event firings
I tried setting focus to other control but it is not resolving the issue.
Or I can say that it is always activating the first control.
This is the stack trace snapshot.
I tried handling almost all UltraDockManager events and added code to shift the focus, but it didn't work.
Thus, the dockmanager is always executing the cluck event on FlyIn.
This issue is occurring on FlyIn. I'm not docking the panel. So, if it has came out and I move the cursor it goes in to which I call as FlyIn.
I have somehow resolved FlyOut issue. But FlyIn issue is still not resolved. I tried setting focus to other control but it is starting with first control only.