How to Enable/Disable radtoolbar from client side ?

2 posts, 1 answers
  1. M Kumar
    M Kumar avatar
    96 posts
    Member since:
    Apr 2008

    Posted 17 Apr 2019 Link to this post

    Hi ,  How to Enable/Disable radtoolbar from client side ?
    i am used jquery like below , but not disabled.

    var rtbar = $find("ctl00_ContentPlaceHolder1_Searchbar");

     if (SelectedName == "False") {
            $("#rtbar").attr("disabled", true);
             //   $("#rtbar").prop("disabled", true);
           // $("#rtbar").attr("style", "disabled:true;");
        }
        else {
           $("#rtbar").removeAttr('disabled');
            // $("#rtbar").attr("disabled", false);
            //$("#rtbar").attr("style", "disabled:false;");
        }

    Thanks
     
       

  2. Answer
    Rumen
    Admin
    Rumen avatar
    14163 posts

    Posted 17 Apr 2019 Link to this post

    Hi,

    You can use the built-in client-side API of RadToolbar to enable and disable it:

    var rtbar = $find("ctl00_ContentPlaceHolder1_Searchbar");
     
    rtbar.set_enabled(false); //will disable it
    rtbar.set_enabled(true); //will enable it


    Regards,
    Rumen
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top