Disabling RadToolBarItem not working

4 posts, 1 answers
  1. Tanja McElvey
    Tanja McElvey avatar
    4 posts
    Member since:
    Dec 2009

    Posted 16 Dec 2009 Link to this post

    Hello,
    I hope someone can help me with this. We are trying to disable certain RadToolBarItems, when another RadToolBarItem has been clicked. We tried the following two ways:

    RadToolBar1.Items[6].Enabled = false

    Telerik.Web.UI.RadToolBarItem Properties = RadToolBar1.FindItemByText("Properties");  
    Properties.Enabled = false

    The button is still enabled and the user has access to the underlying functionality. Is there any reason why the button shouldn't be disabled using the above code?

    Thank  you in advance.
    Tanja
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 16 Dec 2009 Link to this post

    Hello Tanja,

    I've tested it like this:

    RadToolBar1.FindItemByText("Properties").Enabled = false;

    and it worked without a problem.  Could you please tell us whether you're using RadAjaxManager/RadAjaxPanel on your page, is this code executed with ajax request?


    Best wishes,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tanja McElvey
    Tanja McElvey avatar
    4 posts
    Member since:
    Dec 2009

    Posted 27 Jan 2010 Link to this post

    I've been sidetracked and just now got back to this. Yes, the RadToolBar is ajaxified. The button will disable properly on regular postback. How do I handle this using AJAX?
    Thank you,
    Tanja
  5. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 27 Jan 2010 Link to this post

    Hi Tanja McElvey,

    You can place the toolbar inside RadAjaxPanel, for example. You can check our online examples here and here.

    Kind regards,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top