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

Iterate through each RadDock in a RadDockZone in Javascript

2 Answers 116 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Richard M
Top achievements
Rank 1
Richard M asked on 31 Dec 2010, 12:46 AM
I have 4 RadDocks ("RadDock1", "RadDock2", etc.) inside of RadDockZone1.  In the OnClientDockPositionChanged() function in Javascript, I would like to iterate through each RadDock in RadDockZone1.  How can I do this using a foreach loop, or another method?

2 Answers, 1 is accepted

Sort by
0
Accepted
Dobromir
Telerik team
answered on 03 Jan 2011, 02:26 PM
Hi Richard,

To get reference to all the docks in a specific DockZone you can use the get_docks() method of the dock zone, e.g.:
function OnClientDockPositionChanged(dock, args)
{
    var dockZoneId = dock.get_dockZoneID();
    var dockZone = $find("" + dockZoneId);
 
    if (dockZone)
    {
        var docks = dockZone.get_docks();
        for (var i = 0; i < docks.length; i++)
        {
            alert(docks[i].get_id());
        }
    }
}

You can find more information about the RadDockZone client-size object in the following help article:
RadDockZone Client Object

Greetings,
Dobromir
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Richard M
Top achievements
Rank 1
answered on 03 Jan 2011, 06:00 PM
That works.  Thank you very much!
Tags
Dock
Asked by
Richard M
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Richard M
Top achievements
Rank 1
Share this question
or