Hi,
I am using a UltraExplorerBar with ControlContainer enabled. To allow users to trigger button click in the control I am setting the mainform.Acceptbutton to the Control.Button1 which is added to the ControlContainer.
Setting of AcceptButton in NavigationPaneExpanded event allows the triggering of acceptbutton in the NavigationPane when in Expanded mode.
But this does not work when the NavigationPane is in Flyout mode when setting the acceptbutton in the NavigationPaneFlyoutDisplayed event.
Any help will be appreciated.
- Avinash
Hello,
I am not sure that I completely understand your scenario.In order to try to reproduce this behavior at my end could you please provide me more details like steps that I have to follow in order to able to reproduce it. If you could provide me a small sample that illustrates this behavior it would be helpful for me to understand better the issue that you are describing.
I am waiting for your details.
Hi Hristo,
Thanks for the reply. Let me explain in detail.
I have ultraExplorerBar in my app. I add custom controls to the ultraExplorerBar.Groups programmatically.These custom control are user form that needs to be filled and then submitted.
To help the user to avoid using mouse to fill these forms, I set focus to the first textbox in the form. And set the MainForm.AcceptButton to this form.I am using the acceptbutton(Form.AcceptButton) of the mainform to the control that is shown in the explorerbar. This way if I press enter the button of the control displayed gets triggered.
This needs to be done if new UltraExplorerBarGroup is added or selection changes among the groups or navigationpane expanded.
The below is some part of the code that does the setting of focus and acceptbutton.
private void ultraExplorerBar_NavigationPaneExpanded(object sender, EventArgs e){ if (this.ultraExplorerBar.SelectedGroup != null) { ILauncher launcher = this.ultraExplorerBar.SelectedGroup.Container.Controls[0] as ILauncher; if (launcher != null) { this.AcceptButton = launcher.AcceptButton; //this is the MainForm launcher.InitialFocus(); }
}
Everything works fine for all the above cases. The issue is when the NavigationPane is Collapsed and I click the NavigationBar which triggers the NavigationPaneFlyout. In this case if I try to set the focus and the acceptbutton using the ultraExplorerBar_NavigationPaneFlyoutDisplayed the acceptbutton does not work, the control.button is not triggered.
Thanks Hristo,
As per the sample test, its working but not in our main application. Will check if I can tweak the sample code to reflect the main application.
A important difference is that the UltraExpolorerBar is part of the ultradockmanager. Do you think this could make any difference in behaviour.
I am just checking about the progress of this issue. Did you solve your issue accordingly to the information that I provided you? Did you test the sample I have sent to you?
Let me know if you need any further assistance.
Thank you for using Infragistics Components.
I have modified the sample to work with your requirements. Please run the sample and let me know if it works properly for you.
Let me know if you have any further questions.
Hi
Forgot to inform, in the sample code I have changed the references to Infragistics 10.1 as I don't have 10.3. Let me know if this works as intended in the latest version.
Thanks for the reply.
Made two changes that explains the issue. First added assigned AcceptButton in the constructor that works fine when the NavigationPane is expanded but not when flyout. Even if I try this for flyoutdisplayed it does not work as seen in the second change.