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

RadDock client get_width and floats

1 Answer 21 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Johnny Andersen
Top achievements
Rank 1
Johnny Andersen asked on 24 Sep 2008, 09:56 AM
1) The documentation for RadDock client object specifies thet get_width returns an integer. This is not quite true as it returns a string width 'px' at the back. Would be nice if it would return an int.

2) Is there a way to add floating RadDocks to a page without involving a RadDockZone? What I do now is that I do a dock followed by a undock in order to display the floating RadDock. Is there a way to simply display these docks without docking them first. I tried set_visible, but that didn't do anything.

ScriptManager.RegisterStartupScript( 
        dock, 
        this.GetType(), 
        "AddDock"
        string.Format(@"function _addDock() {{
                                                Sys.Application.remove_load(_addDock);
                                                $find('{1}').dock($find('{0}'));
                                                $find('{0}').undock();
                                                $find('{0}').doPostBack('DockPositionChanged'); per = 1; dockids[dockids.length] = $find('{0}');
                                            }};
                                            Sys.Application.add_load(_addDock);", dock.ClientID, dockZone1.ClientID), 
        true); 

1 Answer, 1 is accepted

Sort by
0
Accepted
Sophy
Telerik team
answered on 24 Sep 2008, 01:02 PM
Hello Johnny,

Please, find below our answers to your questions:
  1. The width and the height of the RadDock can be set in percent as well as in pixels. That is why, 
    the get_width method returns the width of the RadDock as a string instead of and integer. Otherwise, it will not be clear whether the integer value is in pixels or in percent. The information in the online documentation is different as the value which is returned by this method is not updated. We already update it and this inaccuracy will not exist in the next update of the control.
  2. If you do not want to dock the docks in a zone but create floating docks you can use $find('{0}').drop(); instead of  $find('{1}').dock($find('{0}')); and you will also not need the  $find('{0}').undock();  line in this case.

If you have other questions, do contact us again.

Best wishes,
Sophy
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Dock
Asked by
Johnny Andersen
Top achievements
Rank 1
Answers by
Sophy
Telerik team
Share this question
or