We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Drag and Drop to empty TreeView results in Error - How to prevent drops as Child Nodes

Thread ID:

Created:

Updated:

Platform:

Replies:

116849 Jun 18,2014 11:53 AM Jun 27,2014 12:40 AM ASP.NET MVC 9
loading
Tags: TreeView
Rick Thompson
Asked On June 18, 2014 11:53 AM

VS 2013
MVC 12.1.0.49
IE 11

I'm unable to drag from one tree to another when the destination tree is empty. Using IE I receive an error. A screen shot is in the project in the folder _ScreenShots. I've tried with UnobtrusiveJavaScriptEnabled enabled and disabled.  When UnobtrusiveJavaScriptEnabled  is true the results are much worse, the screen shot is when UnobtrusiveJavaScriptEnabled is false.

One more question, is there way to prevent nodes from dropping "into" a child node? In other words I would like only a single level list and not necessarily a tree.

The attached file contains the complete test project.

Thanks,

Rick



Attachment: TestSfMVC_1e813c53.zip

Rick Thompson
Replied On June 18, 2014 01:52 PM

I should have added that I get the error while dragging right near the top line of the Tree. This happens both with and without existing nodes in the tree. The error is "Error: Unable to get property 'nodeName' of undefined or null reference".

Thanks,

Rick

Rick Thompson
Replied On June 18, 2014 02:43 PM

So, maybe it's just me, but the MVC (non-classic) TreeView seems to "be a mess".

I have DropChild and DropSibling, yet I can drag and drop anywhere in the tree.

Is there any documentation that describes, for example, how to prevent dropping on a particular node?

Compared to the original test uploaded I created a root node in each tree, since it seems there needs to be at least one node to drop onto. That's fine and I can drop onto the root node and the node dropped becomes a child node. What I don't want is to be able to drop onto a child node therefore making it a parent.

Thanks,

Rick

Rick Thompson
Replied On June 18, 2014 05:12 PM

When ShowCheckbox is true the check event fires for every item checked in the tree. This doesn't seem correct. I would expect the check event to fire ONLY after the creation of the TreeView AND the user checks a checkbox.

Thanks,

Rick

Rick Thompson
Replied On June 18, 2014 05:14 PM

Sorry, need to qualify this - the check event fires for every checked item during the creation of the TreeView.


Rick Thompson
Replied On June 19, 2014 09:51 AM

The TreeView "create" event doesn't appear to fire either: ...ClientSideEvents(e => e.Create("tvCreated")...

Thanks,

Rick

Rick Thompson
Replied On June 19, 2014 11:22 AM

The TreeView "create" event doesn't appear to fire either: ...ClientSideEvents(e => e.Create("tvCreated")...

Thanks,

Rick

Please ignore the post regarding the create event not being called, it is being called. 

I had a typo - which I didn't see the first 100 times I looked :(

Thanks,

Rick

Harikrishnan P [Syncfusion]
Replied On June 19, 2014 01:57 PM

Hi Rick,

We regret for the inconvenience caused.

Query 1: is there way to prevent nodes from dropping "into" a child node? In other words I would like only a single level list and not necessarily a tree.

Query 2: Using IE I receive an error (“Error: Unable to get property 'nodeName' of undefined or null reference”)

Query 3: I have DropChild and DropSibling, yet I can drag and drop anywhere in the tree.

For query 1, yes we have option to prevent nodes from dropping into as a child node and we can achieve it by disabling the “dropChild” and “dropSibling” properties. But currently it is not working and we are facing issues with Drag and Drop options in treeview. The above reported issues are confirmed as a bug and we have logged defect reports for these issues.

Query: Is there any documentation that describes, for example, how to prevent dropping on a particular node?

Please find the API reference documentation for our JS components in the following link,

http://help.syncfusion.com/cr/js

Currently, we do not have inbuilt options to prevent dropping from particular node. This can be achieved only as a workaround solution by preventing the drop event for the required nodes.

Query: I would expect the check event to fire ONLY after the creation of the TreeView AND the user checks a checkbox.

We have analyzed this query (“the check event fires for every checked item during the creation of the TreeView.”) and confirmed this as a bug and logged a defect report for this.

The Fix for all the above reported issues will be available in our next service pack release which is expected to be rolled out at the end of next month. We will update this thread once these issue are fixed.

Please let us know if you have further queries

Regards,

HariKrishnan.


Rick Thompson
Replied On June 19, 2014 01:59 PM

Excellent, thanks for the update.


Rick


Harikrishnan P [Syncfusion]
Replied On June 27, 2014 12:40 AM

Hi Rick,

Thanks for the update. The fix for the reported issues will be available in our next service pack release for ASP.NET MVC. Our next service pack release is expected to be rolled out by the end of next month (July). Once it is rolled out we will update this thread.

Please get back to us if you would require any further assistance.

Regards

HariKrishnan.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;