Resetting a RadToolBarItem to unchecked

3 posts, 0 answers
  1. Tim
    Tim avatar
    57 posts
    Member since:
    Apr 2011

    Posted 01 Nov 2011 Link to this post


    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????

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Nov 2011 Link to this post

    Hello Tim,

    You can try the following code snippet.

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

  3. DevCraft R3 2016 release webinar banner
  4. Kate
    Kate avatar
    1898 posts

    Posted 07 Nov 2011 Link to this post

    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,
    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
Back to Top