Disable RadMenu From jQuery

2 posts, 0 answers
  1. Bill
    Bill avatar
    1 posts
    Member since:
    Jun 2011

    Posted 20 Jun 2011 Link to this post


    Forgive me for my ignorance here, but I have exhausted all other avenues. Hopefully someone can point me in the right direction.

    I am trying to write jQuery that will allow me to access a RadMenu object from client-side and call the disable function on that object. The issue is, I'm writing the code to be generic. Given that, I'll only know the name of the containing <div>, not the actual RadMenu ID. Can this be accomplished, or am I barking up the wrong tree? Below is the code that I am currently attempting to use, but firebug shows an error of "$("[id$=" + target + "]").find('[id$="rmMenu"]').disable is not a function". The "target" is the string representing the div id before asp.net gets hold of it and prepends the id with the asp.net identifier string.

    Thanks in advance...

    $("[id$=" + target + "]").find('[id$="rmMenu"]').disable();
  2. Plamen
    Plamen avatar
    3056 posts

    Posted 22 Jun 2011 Link to this post

    Hello Bill,

    You may try to change your ".disable();" to ".get(0).disabled=true;".

    Hope this works for you.

    Kind regards,
    Plamen Zdravkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top