Mark Davison
                                            
                                    
    Top achievements
    
            
                
                Rank 1
            
    
                                        
                                        Mark Davison
                                        asked on 20 Jun 2007, 01:40 PM
                                    
                                Hi,
Is there anyway to add cutom html to the Dock Header bar? I need to be able to show the dock heading, a custom combo box then the command buttons.
Regards,
Mark
                                Is there anyway to add cutom html to the Dock Header bar? I need to be able to show the dock heading, a custom combo box then the command buttons.
Regards,
Mark
9 Answers, 1 is accepted
0
                                Hello Mark Davison,
If by the header you mean the titlebar, then this is possible to achieve by using the <titlebartemplate> template in a manner like this:
<telerik:raddock id="RadDock1" runat="server" height="280px" width="200px" >
<titlebartemplate>
<asp:label runat="server" id="TitleLabel" text="Dock1" />
<asp:dropdownlist runat="server" id="customCombo1" />
                    
</titlebartemplate>
</telerik:raddock>
Hope this helps.
Best wishes,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
                                        If by the header you mean the titlebar, then this is possible to achieve by using the <titlebartemplate> template in a manner like this:
<telerik:raddock id="RadDock1" runat="server" height="280px" width="200px" >
<titlebartemplate>
<asp:label runat="server" id="TitleLabel" text="Dock1" />
<asp:dropdownlist runat="server" id="customCombo1" />
</titlebartemplate>
</telerik:raddock>
Hope this helps.
Best wishes,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
                                
                                                    Mark Davison
                                                    
                                            
    Top achievements
    
            
                
                Rank 1
            
    
                                                
                                                answered on 21 Jun 2007, 10:39 AM
                                            
                                        Hi,
I think that will do what I want. How can I create this dynamically from the code behind file? I am creating the docks based on user configuration so I am doing it all manually. I cannot see how to create this template through code.
Regards,
Mark
                                        I think that will do what I want. How can I create this dynamically from the code behind file? I am creating the docks based on user configuration so I am doing it all manually. I cannot see how to create this template through code.
Regards,
Mark
0
                                Hi Mark Davison,
You can access the TitlebarContainer server-side and add controls to it in a manner similar to the following:
Label label1 = new Label();
label1.ID = "Label1";
label1.Text = "New title";
RadDock1.TitlebarContainer.Controls.Add(label1);
You can also use the RadDock's TitlebarTemplate. Let me know if you need more help with this question.
Kind regards,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
                                        You can access the TitlebarContainer server-side and add controls to it in a manner similar to the following:
Label label1 = new Label();
label1.ID = "Label1";
label1.Text = "New title";
RadDock1.TitlebarContainer.Controls.Add(label1);
You can also use the RadDock's TitlebarTemplate. Let me know if you need more help with this question.
Kind regards,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
                                
                                                    Nonu
                                                    
                                            
    Top achievements
    
            
                
                Rank 1
            
    
                                                
                                                answered on 26 Jul 2007, 06:09 AM
                                            
                                        I am using a docking object inside a docking zone. I want to add custom controls in header or titlebar of the docking object. I tried to use the following code you provided. But there is no such property (titlebartemplate) for RadDockableObject. Please tell me what to do
<titlebartemplate>
<asp:label runat="server" id="TitleLabel" text="Dock1" />
<asp:dropdownlist runat="server" id="customCombo1" />
                    
</titlebartemplate>
                                        <titlebartemplate>
<asp:label runat="server" id="TitleLabel" text="Dock1" />
<asp:dropdownlist runat="server" id="customCombo1" />
</titlebartemplate>
0
                                Hello Nonu,
The code provided in this thread is for RadDock Prometheus. Declaratively, you can achieve the same result this way:
<telerik:raddock id="RadDock1" runat="server" height="280px" width="200px"
dockmode="Default">
<titlebartemplate>
<asp:label id="TitleLabel" runat="server" text="Dock1"></asp:label>
</titlebartemplate>
</telerik:raddock>
But from your post as you mention RadDockableObject I am left with the impression that you want to achieve this with the "regular" RadDock - unfortunately, this is not possible.
Regards,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
                                        The code provided in this thread is for RadDock Prometheus. Declaratively, you can achieve the same result this way:
<telerik:raddock id="RadDock1" runat="server" height="280px" width="200px"
dockmode="Default">
<titlebartemplate>
<asp:label id="TitleLabel" runat="server" text="Dock1"></asp:label>
</titlebartemplate>
</telerik:raddock>
But from your post as you mention RadDockableObject I am left with the impression that you want to achieve this with the "regular" RadDock - unfortunately, this is not possible.
Regards,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
                                
                                                    ashish
                                                    
                                            
    Top achievements
    
            
                
                Rank 1
            
    
                                                
                                                answered on 29 Aug 2007, 05:53 AM
                                            
                                        Can I use the titlebartemplate to add a radcalendar and use it to feed a date to a user control in the dock? Can you provide a sample?
                                        0
                                
                                                    ashish
                                                    
                                            
    Top achievements
    
            
                
                Rank 1
            
    
                                                
                                                answered on 29 Aug 2007, 09:04 AM
                                            
                                        Thanks for responding so fast, but are you sure this is the right sample? I do not see any thing added to the titlebar leave alone a radcalendar. 
Thanks
                                        Thanks
0
                                Hi ashish,
I attached the wrong .zip by mistake. Please, find attached the correct project. Apologies for my carelessness. Let me know how it goes.
Best wishes,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
                                        I attached the wrong .zip by mistake. Please, find attached the correct project. Apologies for my carelessness. Let me know how it goes.
Best wishes,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
                                
                                                    ashish
                                                    
                                            
    Top achievements
    
            
                
                Rank 1
            
    
                                                
                                                answered on 29 Aug 2007, 07:28 PM
                                            
                                        Thanks. This looks more like it :) I will try it tonight and update.