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

Disabling RadToolBarItem not working

3 Answers 51 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Tanja McElvey
Top achievements
Rank 1
Tanja McElvey asked on 16 Dec 2009, 02:57 PM
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

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 16 Dec 2009, 04:08 PM
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.
0
Tanja McElvey
Top achievements
Rank 1
answered on 27 Jan 2010, 02:02 PM
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
0
Accepted
Yana
Telerik team
answered on 27 Jan 2010, 03:50 PM
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.
Tags
ToolBar
Asked by
Tanja McElvey
Top achievements
Rank 1
Answers by
Yana
Telerik team
Tanja McElvey
Top achievements
Rank 1
Share this question
or