This is a migrated thread and some comments may be shown as answers.

Filling Text of RadMenuItem in Code Behind.

1 Answer 144 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Tonino
Top achievements
Rank 1
Tonino asked on 14 Jun 2013, 02:38 PM
Hello!

I have a 'classic' RadMenu with different items. My goal is to read the text of the menu items from a funtion in code behind. Reading from resx works (first item). The other menu items don't show any text.

ASPX:
         <radM:RadMenu ID="phMenu" runat="server" IsContext="True" ContextMenuElementID="none"
            CausesValidation="false">
            <Items>
               <radM:RadMenuItem runat="server" Text="<%$Resources:InputControlsRes,menuAddFiltername_Text %>" Value="AddFiltername" />
               <radM:RadMenuItem runat="server" Text='<%# GetStringResource("ActionId") %>' Value="AddActionId" />
               <radM:RadMenuItem runat="server" Text='<%# GetStringResourceActionId %>' Value="AddActionIdFix" />
               <radM:RadMenuItem runat="server" Text='<%= GetStringResourceActionIdPro100 %>' Value="AddActionIdFixPro100" />
            </Items>
         </radM:RadMenu>

Code Behind:
   Protected Function GetStringResource(key As String) As String
      Return key
   End Function

   Protected Function GetStringResourceActionId() As String
      Return "ActionId"
   End Function

   Protected Function GetStringResourceActionIdPro100() As String
      Return "GetStringResourceActionIdPro100"
   End Function

Functions in code behind are never called, even if I do a DataBind.

Regards,
Tonino.

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 17 Jun 2013, 08:12 AM
Hi Tonino,

Unfortunately we no longer provide support for the classic menu control as fully described in this post. I would however, suggest that you upgrade to the latest version of the Telerik controls and refer to this help article where you can find detailed information on the scenario that you are trying to achieve.

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Menu
Asked by
Tonino
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or