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

Example code for ItemTemplateSelector

1 Answer 141 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
hwsoderlund
Top achievements
Rank 1
hwsoderlund asked on 19 Sep 2008, 07:38 AM
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) 
    C# 
    Java 
    C++ 
    Visual Basic 
    + Add (button) 
Databases (header) 
    DB2 
    SQL Server 
    MySQL 
    + 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.

/Henrik

1 Answer, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 19 Sep 2008, 07:48 AM
Hello Henrik,

You can check this example:
http://demos.telerik.com/silverlight/#Examples/TreeView/TemplateSelector

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,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
hwsoderlund
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Share this question
or