The issue is related to another DexExpress product: XtraBars.
The XtraBars is used to visualize actions in the MainWindow, DetailWindow, NestedView and other templates.
The 'Ctrl+N' keys combination is a shortcut processed by XtraBars. It executes the 'New' action, which creates a new object.
It is obvious that a user wants to create a new object in a NestedView when the NestedView is focused and the 'Ctrl+N' keys combination is pressed.
The XtraBars doesn't support this behavior. We have tried to implement it manually, but without success.
Currently this behavior in the XtraBars product is by design, see the following issues:
- "Incorrect order processing a shortcut" at http://www.devexpress.com/issue=DB18587
- "shortcut with multiple barmanager" at http://www.devexpress.com/issue=CQ51666
- "Conflict between shortcuts" at http://www.devexpress.com/issue=CQ58722
- "XtraTab" at http://www.devexpress.com/issue=CQ46465
- "tab order" at http://www.devexpress.com/issue=CQ14451
- "Bars on usercontrols lovcated in different tabpages" at http://www.devexpress.com/issue=DQ45833
- "Design Customization of Toolbar on a user control" at http://www.devexpress.com/issue=D280
- "BarManager controls (toolbars and items) should be visible in the Designer when they are used on a UserControl and this UserControl is embedded into another UC or Form" at http://www.devexpress.com/issue=AS8297
- "Multiple menus" at http://www.devexpress.com/issue=DQ15819
I have created a suggestion to the XtraBars product, you can review it at http://www.devexpress.com/issue=AS16559.
Since this and Stan's reply on 07/08/2007 re. Xtrabars are approaching their first birthdays and Stan passed the issue back to you to fix I am wondering what has happened to this bug. I hope that you do not think that the still current behaviour (pressing Ctrl-N on a detail view with one or more nested list views will cause a random one of the New buttons to be pressed) is correct or acceptable? I have users complaining that when they press the Ctrl-N, different kinds of record are created - that's a tough one to explain or justify. You can reproduce this issue in MainDemo by opening a Contact and pressing Ctrl-N while moving focus around the form - sometimes it will create a new Contact and other times a new Phone Number... Could you please fix this bug?
Currently, in XAF, shortcuts behave in this way: a shortcut executes an action of the focused view. In other words, if a control on a nested detail view is focused, then an action of that detail view is executed. And, if a focused control is placed on the surface of a root detail view, then an action of this root detail view is executed.
This is what we wanted from XtraBars a while ago, and it seems that XtraBars team implemented this behavior. It seems for me that they implemented it about a year ago. Most likely, guys reviewed old suggestions and Stan has miunderstood the AS16559 suggestion, or simply isn't aware of its implementation.
pressing Ctrl-N on a detail view with one or more nested list views will cause a random New button to be pressed
Could you please explain your results in more detail? I have tried to reproduce this issue with the Departments detail view and received a different result while the 'Office' editor is focused: it's either a new Contact or new Department.
Please, clarify it for us: did you expect the same behavior or is there one more issue?
>Currently, in XAF, shortcuts behave in this way...
That is the behaviour I would hope for.
>Could you please explain your results in more detail?
Some more detail: if you have a detail view with nested list views (i.e. a standard XAF detail view for a master-detail relationship like customer - orders), then pressing Ctrl-N while moving between fields belonging to the master object (e.g. customer name, address etc.) will usually fire the New action of the master object (e.g. create a new customer) but sometimes it will fire the New action of the detail object (e.g. create a new order). This behaviour is intermittent but, with some perseverance, is reproducible.