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

Query Drop Event?

2 Answers 72 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
Ivan Zlatanov
Top achievements
Rank 1
Ivan Zlatanov asked on 15 May 2012, 09:29 AM
Hi,

Is it possible to subscribe in javascript somewhere where we can do query drop? For example, if I enable drag and drop functionallity I would also like to be able to do verification of whether a node can be dropped and show this to the user. This is common functionallity in any drag and drop scenario.

I see that you don't have any client side APIs exposed yet, but I was wondering if there is a workaround.

Regards,
Ivan.

2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 18 May 2012, 10:01 AM
Hello Ivan,

 
That is a great question thank you for asking it. Such functionality is not implemented so far in RadOrgChart but we will investigate it further more and will provide some more information about it in this thread as soon as we are ready with our research.

Kind regards,
Plamen Zdravkov
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.
0
Accepted
Plamen
Telerik team
answered on 28 May 2012, 10:04 AM
Hello Ivan,

 
We have inspected the issue with the "query drop" and here is the javascript code that should help you implement similar scenario:

Telerik.Web.UI.RadOrgChart.prototype.postback = function (postBackArgs) {
         if (postBackArgs.command == Telerik.Web.UI.OrgChartPostBackCommand.NodeDrop || postBackArgs.command == Telerik.Web.UI.OrgChartPostBackCommand.GroupItemDrop) {
             if (confirm("Do you want to drop")) {
                 var serializedArguments = Sys.Serialization.JavaScriptSerializer.serialize(postBackArgs);
                 eval(this._postBackReference.replace("arguments", serializedArguments));
             }
         }
         else {
             var serializedArguments = Sys.Serialization.JavaScriptSerializer.serialize(postBackArgs);
             eval(this._postBackReference.replace("arguments", serializedArguments));
         }
     }

Hope this will be helpful.

Kind regards,
Plamen Zdravkov
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
OrgChart
Asked by
Ivan Zlatanov
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or