Ticket T884868
Visible to All Users

Web: How to change caption of logged user in the right top corner

created 5 years ago

Dear support,

I just would like to ask how can I change the caption of the logged user (I like to change it to full name which comes from property of descendant of PermissionPolicyUser):

Clipboard-File-1.png

Using Frame.GetController(Of MyDetailsController)() and the MyDetails Action is the wrong approach
It only change the caption of the action below.

Thanks for your help!!

Best regards from Germany,
Kai

Answers approved by DevExpress Support

created 5 years ago

Hello,

To accomplish this task, create a HeaderMenuController descendant and override its GetActionContainerCaption() method.
For example:

C#
using DevExpress.ExpressApp.Web.SystemModule; namespace dxT884868.Module.Web.Controllers { public class HeaderMenuControllerEx: HeaderMenuController { protected override string GetActionContainerCaption() { var defaultCaption=base.GetActionContainerCaption(); var newCaption = defaultCaption + " customString"; return newCaption; } } }

Result:

Try this approach and let me know your results.

Thanks,
Andrey

    Comments (2)

      This solution is perfect!

      Thanks so much, Andrey!!

      Andrey K (DevExpress Support) 5 years ago

        You are welcome!

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.