Scenario
This example demonstrates how to implement a View Controller that will access layout controls and customize them as required. In particular, the second tab in the tab control should become active when opening the detail form.
Steps to implement
1. This functionality is implemented in the WinCustomizeTabControlViewController and WebCustomizeTabControlViewController classes that are added into the WinForms and ASP.NET module projects respectively (copy these classes into the respective projects of your test solution). Take special note that on the Web we are activating a required tab on the client side instead of using the server-side ASPxTabControlBase > ActiveTabIndex property, which is not appropriate for updating tab control on external callbacks (learn more...).
2. To identify the layout element by the "TabbedGroup" string, make sure this identifier is specified under the Views | YourBusinessObject_DetailView | Layout node in the Model Editor invoked for the YourSolutionName.Module/Model.DesignedDiffs.xafml file.
See also:
eXpressApp Framework > Concepts > UI Construction > View Items Layout
How to show the number of the nested list view's items in the tab caption (Web)
Question Comments
Added By: Wieland Voß at: 4/26/2016 11:30:50 PM Hi all.
Do you have a hint for me, how to determine the index of the active tab?
And moreover, how to determine the index of a particular tab (i. e. by name)?
I want to switch to the "totals" tab, only if the "particulars" tab is the active one.
Best regards,
Wieland
Added By: Dennis (DevExpress Support) at: 4/26/2016 11:37:37 PM
@Wieland: I've created a separate ticket on your behalf (T372263: how to determine the index of the active tab?). It has been placed in our processing queue and will be answered shortly. Please specify your target platform in that new ticket as well (WinForms/Web).