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

radDock Questions!

1 Answer 49 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Emir
Top achievements
Rank 1
Emir asked on 21 Sep 2011, 10:58 AM
Hello,

I am working with the Rad Dock controls to implement a web app where you can create and have a bunch of rad docks  in three zones all containing different widgets, or the same widget but different views. But that does not matter too much for my two questions

First I am wondering is if it is possible to somehow have one Rad Dock span across multiple Rad Dock Zones. The dock zones are in a 3 column layout.  Can I have for example a dock from zone1 extend to zone2 or even to zone3, and still keep the normal flow and layout of the other docks. The zones use a vertical orientation.

What I am basically looking to do is change the width of the Dock, but have it not interrupt or cover any other Docks.

And my second question would be If there are other  ways  to get the client side objects for docks or zones.  Most of the examples  use
server side code snippets  like :
<%= RadDockingZone1.FindControl("Dock0").ClientID %> 
which I am unable to use due to some of the constraints on the application.  And the ID's of the Docks are dynamic because there is constant dock creation and deletion. So I was thinking maybe there is a way to get the client object via a css class or something to do with events ?

All of the docks are in Dock mode, so they can't be floated around.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Accepted
Slav
Telerik team
answered on 23 Sep 2011, 11:20 AM
Hi Emir,

The RadDock control is designed to be dockable only on a single RadDockZone at a time, so placing it in a several zones is not a supported scenario. Nevertheless, you can configure a separate RadDockZone that will have the combined width of the other three dock zones and place the spanning RadDock in it.

Generally, the method $find() is used to reference a RadControl on the client. It provides a shortcut to the Sys.Application.findComponent() method, which returns the specified Component object. The next example shows $find() being used:
var dock = $find("<%=RadDock1.ClientID %>");

If the RadDocks are created dynamically, as in your scenario, you can get the client objects of all RadControlls for ASP.NET AJAX on the page via the method radControls of the telerik client static library. This method can be used to separate only the RadDocks in an array, as demonstrated below:
function get_allRadDocks() {
    var allRadDocks = [];
    var allRadControls = $telerik.radControls;
    // all RadControls are referenced
 
    for (var i = 0; i < allRadControls.length; i++) {
        var element = allRadControls[i];
 
        if (Telerik.Web.UI.RadDock && Telerik.Web.UI.RadDock.isInstanceOfType(element)) {
            allRadDocks.push(element);
        }
    }
    // only the RadDocks are gathered into an array
 
    return allRadDocks;
}

The objects, returned from the presented method, can be used the same way as the ones referenced via the $find method.

I hope the provided information help. Please let us know if you encounter more difficulties.

All the best,
Slav
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
Tags
Dock
Asked by
Emir
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or