Last Updated: 09 Dec 2015 13:50 by ADMIN
Created on: 30 Nov 2015 08:08
Category: Dock
Type: Bug Report
RadDock set with width to percent values gets converted to px after post back
The client state of the dock changes, e.g, 80% to 80px. The pixel value affects the dock after a post back.

Possible workaround:

<telerik:RadDock runat="server" ID="dock2" Width="80%">
        <telerik:RadButton runat="server"></telerik:RadButton>

    Telerik.Web.UI.RadDock.prototype.saveClientState = function () {
        var DECIMAL_RADIX = 10;
        var dock = this;
        var width = dock.get_width();
        var height = dock.get_height();
        var top = dock.get_top() ? parseInt(dock.get_top(), DECIMAL_RADIX) : null;
        var left = dock.get_left() ? parseInt(dock.get_left(), DECIMAL_RADIX) : null;
        var expandedHeight = parseInt(dock._expandedHeight, DECIMAL_RADIX);

        var state = {
            Top: top,
            Left: left,
            DockZoneID: this.get_dockZoneID(),
            Collapsed: this.get_collapsed(),
            Pinned: this.get_pinned(),
            Resizable: this.get_resizable(),
            Closed: this.get_closed(),
            Width: width,
            Height: height,
            ExpandedHeight: expandedHeight,
            Index: this.get_index(),
            IsDragged: this.get_isDragged()

        return Sys.Serialization.JavaScriptSerializer.serialize(state);