jQWidgets Forums
jQuery UI Widgets › Forums › Lists › ListBox › Error when drag/drop. Cannot read property of OriginalItem
Tagged: javascript listbox, jQuery ListBox, jqwidgets listbox, ListBox
This topic contains 4 replies, has 2 voices, and was last updated by jacobraccuia 8 years ago.
-
Author
-
I’m getting this error when using drag and drop with jqxListBox.
Uncaught TypeError: Cannot read property 'originalItem' of null
.I have the listbox running on the same page as a grid and modal window. The listbox is in the modal. Everything seems to work, and when I click to drag, it drags, but errors out when I let go. I couldn’t recreate the error in a fiddle, as my code is exactly as the demos all show.
I am desperate for more help and can provide whatever I need to to help resolve this.
var source = { datatype: 'array', datafields: [ { name: 'datafield' }, { name: 'text' } ], id: 'datafield', localdata: colsStripped, }; var dataAdapter = new $.jqx.dataAdapter(source); $('.columnListReorder').jqxListBox({ allowDrop: true, allowDrag: true, source: dataAdapter, displayMember: 'text', valueMember: 'datafield', width: 190, height: 300 });
Hello jacobraccuia,
I tested it and it seems to work fine.
Could you give us more details? Which version of jQWidgets do you use?Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comjQuery 2.24
and loading all JS from:
https://jqwidgets.com/public/jqwidgets/jqx-all.jsThis is a private site so I can’t show a URL, but if there is at any way to GTM I would gladly share my screen and code.
I tried to look through the code base to see what would cause this error, but I couldn’t find anything. If there is something I’m “missing” or doing that would cause the originalItem to disappear that you know of I could help diagnose this issue more. (Or even an alternative).
I’m looking for a list for items that can be rearranged to create an order, and that has the ability to add / remove items from the list.
I am going to scream!
It wasn’t working because my container ‘.columnListReorder’ was a UL instead of a div.
thanks for your help Hristo!
-
AuthorPosts
You must be logged in to reply to this topic.