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

problem with Ajax - $find()

2 Answers 53 Views
Dock
This is a migrated thread and some comments may be shown as answers.
skinflint
Top achievements
Rank 1
skinflint asked on 13 Jan 2010, 12:32 PM
Hi,
I am trying to get all RadDock and RadDockZone objects. Code goes like this:

First I get all IDs from a page since controls are generatet from code behind:

$('.RadDockingZone').each(function() {
            var testZone = this;
            zoneIDs.push(testZone.id);
        });

$('.RadDockableObjectFixed').each(function() {
          var testDock = this;
          dockIDs.push(testDock.id);
 });

This is a part of code that creates problems:

for (i = 0; i < dockIDs.length - 1; i++) {
        var zone = $find(zoneIDs[i]);
        var dock = $find(dockIDs[i]);        
}

These lines always returns nulls
var zone = $find(zoneIDs[i]);
var dock = $find(dockIDs[i]);     

Any ideas what is causing a problem?

2 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 18 Jan 2010, 08:57 AM
Hello skinflint,

From the provided source code I can see that you are using RadDock for ASP.NET i.e. the classic version of RadDock and not its AJAX version. This means that in order to find the needed client objects you need to use the following methods:
  • Zone - RadDock_GetDockingZone(sId)
  • Dock - RadDock_GetDockableObject(sId)

More information about RadDock for ASP.NET can be found on our website: http://www.telerik.com/help/aspnet/dock/clientapi.html

P.S. Our suggestion for all new development is to use RadDock for ASP.NET AJAX, which is built on top of ASP.NET AJAX. We stopped the development of RadDock for ASP.NET and all our new development is concentrated on RadDock for ASP.NET AJAX. Most of bugs related to RadDock for ASP.NET are fixed in it. You can find more about it in our online examples here: http://demos.telerik.com/aspnet-ajax/dock/examples/overview/defaultcs.aspx


Greetings,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
skinflint
Top achievements
Rank 1
answered on 19 Jan 2010, 02:24 PM
Thanx!
Tags
Dock
Asked by
skinflint
Top achievements
Rank 1
Answers by
Pero
Telerik team
skinflint
Top achievements
Rank 1
Share this question
or