Completed
Last Updated: 26 May 2016 11:28 by ADMIN
ADMIN
Danail Vasilev
Created on: 18 Jun 2013 11:06
Category: Dock
Type: Bug Report
1
FIX height setting of the RadDock when it is expanded
When a RadDock without having its height property set is collapsed and then expanded, an explicit height is set to its wrapper as well as to its content wrapper, so that it cannot be resized. The workaround is to remove both heights on DockExpandCollapseCommand:

ASPX:

        <telerik:RadDock runat="server" ID="RadDock1" RenderMode="Classic" Resizable="true">
            <ContentTemplate>
                <asp:Button ID="btn" runat="server" Text="Click me" OnClientClick="toggleVisibility(); return false;" />
                <div id="divExpand" style="display: none; height: 400px;">
                    Expanded
                </div>
            </ContentTemplate>
            <Commands>
                <telerik:DockExpandCollapseCommand OnClientCommand="DockExpandCollapseCommand" />
            </Commands>
        </telerik:RadDock>

JavaScript:

        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                function toggleVisibility() {

                    var divExpand = $get('divExpand');

                    if (divExpand.style.display == 'none') {
                        divExpand.style.display = 'block';
                    }
                    else {
                        divExpand.style.display = 'none';
                    }
                }

                function DockExpandCollapseCommand(sender, args) {

                    if (!sender.get_collapsed()) {
                        sender.get_contentContainer().style.height = "";
                        sender.get_element().style.height = "";
                    }
                }
            </script>
        </telerik:RadCodeBlock>
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Ianko
Posted on: 26 May 2016 11:28
Will be fixed for R2 2016 SP1 release.