3 Answers, 1 is accepted
0
Vyrban
Top achievements
Rank 1
answered on 31 Jul 2009, 08:15 AM
Hi Golu
,
If you put in code-behind a code like:
it will set dynamically content in dock title. Is this what you need or something else?
If you put in code-behind a code like:
protected void Page_Load(object sender, EventArgs e) { RadDock1.Title = DateTime.Now.ToString(); } |
0
Golu
Top achievements
Rank 1
answered on 01 Aug 2009, 04:39 AM
Hello Mr. Vyrban
Thanks for replying, but i m not talk about to set dock title,
I need dock title template so that after dock is added change its title.
See demo edit title. In that edit title but its at desgin time, and I have to set this functionality at dynamically.
thanks with regards
Thanks for replying, but i m not talk about to set dock title,
I need dock title template so that after dock is added change its title.
See demo edit title. In that edit title but its at desgin time, and I have to set this functionality at dynamically.
thanks with regards
0
Jim
Top achievements
Rank 1
answered on 04 Aug 2009, 07:18 AM
You can dynamically add Controls to the TitleBarContainer Controls collection in the following way:
For an example if you have a RadDock in the .aspx
When the page initializes we can add a LinkButton control to its TitleBarContainer, and attach an event handler method to the LinkButton Click event
For an example if you have a RadDock in the .aspx
<telerik:RadDockLayout ID="RadDockLayout1" runat="server"> |
<telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"> |
<telerik:RadDock ID="RadDock1" runat="server" Width="300px" Title="RadDock-Title"> |
<ContentTemplate> |
<asp:Label ID="Label1" runat="server" Text="TextNotChanged"></asp:Label> |
</ContentTemplate> |
</telerik:RadDock> |
</telerik:RadDockZone> |
</telerik:RadDockLayout> |
When the page initializes we can add a LinkButton control to its TitleBarContainer, and attach an event handler method to the LinkButton Click event
protected void Page_Init(object sender, EventArgs e) |
{ |
LinkButton LinkButton1 = new LinkButton(); |
LinkButton1.Text = "LinkButton Text"; |
// attach an event handler to the Click event |
LinkButton1.Click += new EventHandler(LinkButton_Click); |
// add the LinkButton to the RadDock's TitleBar template |
RadDock1.TitlebarContainer.Controls.Add(LinkButton1); |
} |
protected void LinkButton_Click(object sender, EventArgs e) |
{ |
Label1.Text = DateTime.Now.ToString(); |
} |