Customise Dock Header

10 posts, 0 answers
  1. Mark Davison
    Mark Davison avatar
    82 posts
    Member since:
    Jul 2005

    Posted 20 Jun 2007 Link to this post

    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
  2. Petya
    Admin
    Petya avatar
    869 posts

    Posted 20 Jun 2007 Link to this post

    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
  3. Mark Davison
    Mark Davison avatar
    82 posts
    Member since:
    Jul 2005

    Posted 21 Jun 2007 Link to this post

    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
  4. Petya
    Admin
    Petya avatar
    869 posts

    Posted 21 Jun 2007 Link to this post

    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
  5. Nonu
    Nonu avatar
    14 posts
    Member since:
    Apr 2007

    Posted 26 Jul 2007 Link to this post

    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>

  6. Petya
    Admin
    Petya avatar
    869 posts

    Posted 26 Jul 2007 Link to this post

    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
  7. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 29 Aug 2007 Link to this post

    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?
  8. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 29 Aug 2007 Link to this post

    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
  9. Petya
    Admin
    Petya avatar
    869 posts

    Posted 29 Aug 2007 Link to this post

    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
  10. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 29 Aug 2007 Link to this post

    Thanks. This looks more like it :) I will try it tonight and update.
Back to Top