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

Resetting a RadToolBarItem to unchecked

2 Answers 49 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 01 Nov 2011, 07:41 PM
Hi

I have a RadToolBar with a couple of ToolBarButtons in.

When the the control they are in initally displays neither of them are highlighted.

When I click on them they highlight correctly and I can see that the class is beeing changed from

"rtbItem rtbBtn" to "rtbItem rtbBtn rtbChecked"

I would like to be able to set the highlighted button when the control is initialize.

Is there a way to do this with Server Side code????

TIA

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Nov 2011, 07:45 AM
Hello Tim,

You can try the following code snippet.

C#:
protected void Page_Load(object sender, EventArgs e)
 {
   RadToolBarButton item =(RadToolBarButton)RadToolBar1.FindItemByText("First");
   item.Checked = true;
 }

Thanks,
Princy.
0
Kate
Telerik team
answered on 07 Nov 2011, 11:21 AM
Hello Tim,

You could also refer to our on-line documentation for more clarification on how to work with items of the RadToolBar using the server-side.  

Kind regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ToolBar
Asked by
Tim
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Kate
Telerik team
Share this question
or