How to remove RadToolBarDropDown itmes programmaticaly

2 posts, 0 answers
  1. splattne
    splattne avatar
    2 posts
    Member since:
    Jun 2007

    Posted 25 Aug 2008 Link to this post


    How can I programmatically remove a RadToolBarButton item (server side)?

    I know there's Toolbar.Items.Remove(...)

    But I can neither use the Value property nor the CommandName on a Dropdown in order to get a reference to the object to pass to the Remove method. There is no ID on the items either.

    I can't / won't use ByText, because it's a multilingual system and I don't want to depend on such a criterion.

    Do I have to use attributes or is there a smarter way?


  2. Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 27 Aug 2008 Link to this post

    Hi splattne,

    You can use the RemoveAt method passing the index of the dropdown button to it:


    where 3 is the index of my dropdown.

    Best wishes,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top