in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

NavBar: How to read a resource string in a NavBarGroup-Text?

Last post 11/11/2008 12:33 PM by Victor A (Developer Express). 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 11/6/2008 9:55 AM

    NavBar: How to read a resource string in a NavBarGroup-Text?

    If i want to give the ASPXNavbar Group Control an dynamically Text from any resource it gives the errormessage, that the DataBind Event is not supported on this Control.

    Create an new ASPXNAvBarGroup Control and add a new Group.
    Then give the Group a text from a resource:

      <dxnb:NavBarGroup Text=<%# Resources.Config.AppName%> >
                          </dxnb:NavBarGroup>

    How can i give the control a string from a resource?
    I must use it for an multilanguage Application!

     

    With the NavBar Control it works, but not with the NavBarGroup and Items.

    The same is on the aspxMenu-item.

     

    Make this sense?

     

    Please help.

     

  • 11/11/2008 12:33 PM In reply to

    Re: NavBar: How to read a resource string in a NavBarGroup-Text?

    Hi Bernd,

    It's absolutely correct that only the controls that support a DataBind
    event can use binding expressions. Other controls simply cannot
    evaluate these kinds of expressions.

    The NavBarGroup control is one that doesn't support binding expressions.

    However, you can use other types of expressions within an ASPX markup,
    the so-called $-expressions. These expressions can be used with some
    types of expression builders. For example, if talking about localization,
    I can use the ResourceExpressionBuilder to refer to some resource data:

    <dxnb:NavBarGroup Text='<%$ Resources:MyResourceString1 %>'>

    Or, you can use the AppSettingsExpressionBuilder to retrieve some
    application settings:

    <dxnb:NavBarGroup Text='<%$ AppSettings:appName %>'>

    Furthermore, you can write you own expression builder with your
    own custom logic.

    Finally, you can always access any control within code on the
    server side and change any it's property you want without any
    restrictions.

    Victor
    R&D, ASP.NET Team, DevExpress Inc.

    P.S. If you wish to receive direct assistance from our Support Team, use Support Center.
Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED