Example code for ItemTemplateSelector

2 posts, 0 answers
  1. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 19 Sep 2008 Link to this post

    Hi guys, I would like to use RadPanelBar, but with an "Add item" button at the end of each child collection. So it would look something like this:
    Programming languages (header) 
        Visual Basic 
        + Add (button) 
    Databases (header) 
        SQL Server 
        + Add (button) 

    I was thinking along the lines of using ItemTemplateSelector to switch the template for the last item in each child collection to include both the text and the "Add" button. But I can't find any examples on how to use ItemTemplateSelector. Also, if you have a better suggestion on how to solve my problem, please let me know.


  2. Valentin.Stoychev
    Valentin.Stoychev avatar
    2198 posts

    Posted 19 Sep 2008 Link to this post

    Hello Henrik,

    You can check this example:

    It is for the RadTreeView but for RadPanelBar the code will be exactly the same.

    BTW: If you are not using databinding you can insert the button directly into the Items collection of the RadPanelBar.

    Kind regards,
    the Telerik team

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