Set Text RadMenuItem client side

3 posts, 0 answers
  1. Chris
    Chris avatar
    1 posts
    Member since:
    Oct 2010

    Posted 31 Oct 2011 Link to this post

    Hi team,
                   I have a RadMenu setup as a Context menu ,i want to know how to set the text property already discussed  this url .Here they are given some solution.but it is not working.

    Your code:

    var menu = <%= RadMenu1.ClientID %>;  
    var element = menu.Items[0].TextElement;  
    element.innerHTML = "new menu text";  

    if i used that same  code ,i got error like "items is undefined".How to solve that issue..

    Then i need another one help from you,i want to bind the rad menu dynamically in client side jquery code.Before binding new menu item i need to clear all the old menu items.How i can do?i have tried all your samples...Please  give the correct solution for this problem.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 31 Oct 2011 Link to this post

    Hello Chris,

    You can try the following javascript to set text.
    <script type="text/javascript">
    function OnClientLoad(sender, args)

  3. DevCraft R3 2016 release webinar banner
  4. Jhonny
    Jhonny avatar
    5 posts
    Member since:
    Nov 2013

    Posted 31 Jan 2014 in reply to Princy Link to this post

    Hi Princy, Your answer is correct,Thanks, Regards.
Back to Top