1. Nithya Rani
    Nithya Rani avatar
    47 posts
    Member since:
    Oct 2012

    Posted 20 Feb 2012 Link to this post


    I have 2 raddock in my page. If i click collapse one should close and another should open. During that time my master page height is not changing. Code below is written to collapse the raddock.

     <script type="text/javascript">
            var allDocks = [];
            function DockInit(dock, args) {
                allDocks[allDocks.length] = dock;
            function DockCommand(dock, args) {
                var commandName = args.command.get_name();
                if (commandName = "ExpandCollapse") {
                    if (dock.get_collapsed() == false) {
                        for (var i = 0; i < allDocks.length; i++) {
                            if (allDocks[i] != dock) {


    See the attached image how its looks
  2. Slav
    Slav avatar
    1359 posts

    Posted 22 Feb 2012 Link to this post

    Hello Nithya,

    The code that you have provided appears to be correct, except the operator in the first if statement. Please change it as shown below:
    if (commandName == "ExpandCollapse") {

    Also, you can set small value for the MinHeight property of the RadDockZone, in which the dock controls are placed, so that its height is defined by the contained RadDocks. This way your page's layout will be changed when the RadDocks are collapsed and expanded, if it depends on the height of the RadDockZone control.

    Please provide additional information on your problem, if there are still details left unclear.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top