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

Drag and drop from kendo treeview to a div container

1 Answer 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
German
Top achievements
Rank 1
German asked on 14 Jan 2013, 04:44 PM
Hi,

I'm currently doing it this way:

            KendoTreeView treeView = myManager.ActiveBrowser.Find.ByXPath<KendoTreeView>("//div[@data-role='treeview']");

            IList<KendoTreeNode> listNodes = treeView.AllNodes;

            int elem = 1;

            //System.Diagnostics.Debug.Print(listNodes.ElementAt(elem).ChildNodesCount.ToString());

            listNodes.ElementAt(elem).

            listNodes.ElementAt(elem).ScrollToVisible();

            listNodes.ElementAt(elem).DragTo(new Point(500, 720));

But it's not working correctly. The mouse starts from the center of the treeview, and all elements whose text does not have the length of at least half the horizontal size of the treeview, are not being selected. Is there a better way to do it?

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 18 Jan 2013, 09:46 AM
Hello German,

I apologize for the delay in getting back to you.

To overcome the problem you can perform Drag&Drop against the child Span element contained in the KendoTreeNode(see screenshot). Please try one of the following lines of code and let me know if you need further assistance on this.
listNodes[elem].Find.AllByTagName<HtmlSpan>("span")[0].DragTo(new Point(720, 520));

or

listNodes.ElementAt(elem).Find.AllByTagName<HtmlSpan>("span")[0].DragTo(new Point(720, 520));


Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
German
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or