Current filter:
                                You should refresh the page.
                                  • Hi

                                    I got language specific dashboard and added an dashboard navigation item where the DashboardTitle is het default en dashboard.
                                    the user has a language preference.

                                    If created an windowviewcontroller and try to change the DashboardTitle to the correct dashboard with te language id.

                                    [C#]
                                    private void ShowNavigationItemController_NavigationItemCreated(object sender, NavigationItemCreatedEventArgs e) { if (e.NavigationItem.Id == NavigationGroupCaption) { var user = SecuritySystem.CurrentUser as ExtendedUser; if (user == null) return; if (user.SelectedLanguage == null) return; var dashboardNavigation = e.ModelNavigationItem as IModelDashboardNavigationItem; var title = dashboardNavigation.DashboardTitle.Split('-'); dashboardNavigation.DashboardTitle = title[0] + '-' + user.SelectedLanguage.QlabCode; } }
                                    [C#]
                                    private void SubscribeToEvents() { navigationController = Frame.GetController<ShowNavigationItemController>(); if (navigationController != null) { navigationController.NavigationItemCreated += ShowNavigationItemController_NavigationItemCreated; navigationController.CustomGetStartupNavigationItem += NavigationController_CustomGetStartupNavigationItem; navigationController.CustomShowNavigationItem += NavigationController_CustomShowNavigationItem; } }

                                    But it seems not to work.

                                • Uriah (DevExpress Support) 12.02.2019

                                  Hi Steve,

                                  Would you please clarify what you mean by the language-specific dashboard?

                                • Steve Mangelschots 12.02.2019

                                  With language-specific i mean that the datasource has records that are specific and that the captions and field name have different values according to the language.

                                  for now i create 3 dashboards that are identical in layout but not in caption.
                                  Is there a better way of doing this?

                                1 Solution

                                Creation Date Importance Sort by

                                Thank you for your clarification, Steve. In this case, it's necessary to customize the navigation item Data property to set the correct shortcut to the required dashboard. For example:

                                [C#]
                                string lang = "fr"; void navigationItemCreated(object sender, NavigationItemCreatedEventArgs e) { IModelDashboardNavigationItem modelItem = e.ModelNavigationItem as IModelDashboardNavigationItem; if (modelItem != null) { Type dashboardDataType = DashboardsModule.FindDashboardDataType(Application); using (IObjectSpace os = Application.CreateObjectSpace(dashboardDataType)) { object obj = os.FindObject(dashboardDataType, new BinaryOperator("Title", modelItem.DashboardTitle + "-" + lang)); if (obj != null) { ViewShortcut viewShortcut = new ViewShortcut(DashboardsModule.DashboardDetailViewName, os.GetKeyValueAsString(obj)); e.NavigationItem.Data = viewShortcut; e.NavigationItem.Active.SetItemValue(DashboardNavigationController.DashboardNotFoundKey, true); } } } }