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

RadDock exapand collapse Button Position

2 Answers 103 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Rashmi
Top achievements
Rank 1
Rashmi asked on 16 Sep 2011, 05:41 PM
I am using Raddock control in my application where I have an requirement where I need to move the expand collapse button Position to the center of Raddock. Is there any way I can control the position and move it to middle of dock?  Or how I can create custom button which will give me the ability to perform expand and collapse functions?

2 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 19 Sep 2011, 08:03 AM
Hello Rashmi,

The following code demonstrates how to move the expand/collapse bbuttons to the center of the titlebar. Note that you should not use Dock Title property in that scenario as it will not work properly with these modifications:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        div.RadDock .rdCenter .rdCommands
        {
            float: none;
            position: relative;
            left: 45%;
            display: inline-block;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sm1" runat="server" />
    <telerik:RadDock runat="server" ID="RadDockContent" Title="Dock Title" EnableRoundedCorners="true" Top="20"
        Left="20">
        <ContentTemplate>
            <p>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus eget tortor ipsum,
                tristique vehicula turpis. Fusce adipiscing, neque a elementum vestibulum, neque
                erat convallis massa, ac tempus urna sapien ut risus. Sed vestibulum fringilla pharetra.
            </p>
        </ContentTemplate>
    </telerik:RadDock>
    </form>
</body>
</html>

If you want to use centered buttons together with Title, you should use the following code:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        .rdTitleBar
        {
            position: relative;
        }
        div.RadDock .rdCenter .rdCommands
        {
            float: none;
            position: absolute;
            left: 40%;
            display: inline-block;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sm1" runat="server" />
    <telerik:RadDock runat="server" ID="RadDockContent" Title="Dock Title" EnableRoundedCorners="true" >
        <ContentTemplate>
            <p>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus eget tortor ipsum,
                tristique vehicula turpis. Fusce adipiscing, neque a elementum vestibulum, neque
                erat convallis massa, ac tempus urna sapien ut risus. Sed vestibulum fringilla pharetra.
            </p>
        </ContentTemplate>
    </telerik:RadDock>
    </form>
</body>
</html>


Regards,
Bozhidar
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
0
Rashmi
Top achievements
Rank 1
answered on 20 Sep 2011, 03:25 AM
It worked great......Thanks.....
Tags
Dock
Asked by
Rashmi
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Rashmi
Top achievements
Rank 1
Share this question
or