Posted 19 Sep 2012 Link to this post
Markup .aspx
<
telerik:RadPanelBar
ID
=
"PanelBar1"
Height
"100px"
Width
"100%"
EnableEmbeddedSkins
"false"
Skin
"MyCustonSkin"
runat
"server"
>
</
Code Behind .aspx.cs
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadPanelItem myProfilePanelItem =
new
RadPanelItem();
myProfilePanelItem.Text =
"My Profile"
;
RadPanelItem myFavoritesPanelItem =
myFavoritesPanelItem.Text =
"My Favorites"
Button btnSearchFavorites =
Button();
btnSearchFavorites.Text =
"Search more favorites"
btnSearchFavorites.CssClass =
"ButtonStyle"
btnSearchFavorites.Click +=
EventHandler(btnSearchFavorites_Click);
myFavoritesPanelItem.Controls.Add(btnSearchFavorites);
PanelBar1.Items.Add(myProfilePanelItem);
PanelBar1.Items.Add(myFavoritesPanelItem);
}
btnSearchFavorites
_Click(
Response.Redirect(
"~/Favorites"
,
false
);
Posted 20 Sep 2012 Link to this post
CustomContentTemplate template =
CustomContentTemplate();
foreach
(RadPanelItem item
in
PanelBar1.Items)
item.ContentTemplate =
template.InstantiateIn(item);
item.DataBind();
class
CustomContentTemplate : ITemplate
public
InstantiateIn(Control container)
container.Controls.Add(btnSearchFavorites);
btnSearchFavorites_Click(
Posted 25 Sep 2012 Link to this post
Posted 02 Oct 2012 Link to this post
Posted 08 Aug 2013 Link to this post