ColReorder/JQuery error when dragging columns
ColReorder/JQuery error when dragging columns
awakener76
Posts: 3Questions: 0Answers: 0
Hi
I'm trying to use ColReorder, however when I drag a column I get the following error:
uncaught exception: Dimensions: jQuery collection is empty
I think it's not being initialized properly, I'm getting the pointer (hand) cursor instead of the move (two arrows forming a cross) cursor. Is it because I have column sorting activated? Below is the code I'm using to initialize the data table:
$('#willcalllist_datatable').dataTable({
"sDom": "Rlfrtip",
"aaSorting": [[28, "desc"], [15, "asc"], [16, "asc"]],
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [2, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 32, 34] }
],
"bPaginate": false,
"fnInitComplete": function () {
fnSetInitialSortAndColumns();
fnSetTableWidth();
fnCalcTotals();
fnPopulatePresets();
}
});
I have the latest versions of DataTable and ColReorder, and I'm using the JQuery 1.7.2 files hosted by Google.
Thanks
Andy
I'm trying to use ColReorder, however when I drag a column I get the following error:
uncaught exception: Dimensions: jQuery collection is empty
I think it's not being initialized properly, I'm getting the pointer (hand) cursor instead of the move (two arrows forming a cross) cursor. Is it because I have column sorting activated? Below is the code I'm using to initialize the data table:
$('#willcalllist_datatable').dataTable({
"sDom": "Rlfrtip",
"aaSorting": [[28, "desc"], [15, "asc"], [16, "asc"]],
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [2, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 32, 34] }
],
"bPaginate": false,
"fnInitComplete": function () {
fnSetInitialSortAndColumns();
fnSetTableWidth();
fnCalcTotals();
fnPopulatePresets();
}
});
I have the latest versions of DataTable and ColReorder, and I'm using the JQuery 1.7.2 files hosted by Google.
Thanks
Andy
This discussion has been closed.
Replies
Allan
http://www.awakener76.net/willcalllist.htm
You'll see the error if you click on a column to sort it, or try and drag a column. The sort does work, then the error occurs.
If line 44 is commented out (the colReorder init) then the sort works and there's no errors, so it's definitely related to the ColReorder.
Thanks
Andy
I'm afraid that this one is going to be a transitional debugging exercise as I don't know off the top of my head what is happening. I'll try to get some time in the next few days to look at it more in depth, but you could try disabling some other plug-ins of the page and see if that makes any difference.
Allan
e is null
file:///D:/Client%20Work/SeatEngine/html/WillCallList_files/colreorder.js
Line 24
Line 24 is:
_fnMouseListener:function(a,c){var d=this;f(c).bind("mousedown.ColReorder",function(a){d._fnMouseDown.call(d,a,c);return!1})},_fnMouseDown:function(a,c){var d=this,b=this.s.dt.aoColumns,e="TH"==a.target.nodeName?a.target:f(a.target).parents("TH")[0],e=f(e).offset();this.s.mouse.startX=a.pageX;this.s.mouse.startY=a.pageY;this.s.mouse.offsetX=a.pageX-e.left;this.s.mouse.offsetY=a.pageY-e.top;this.s.mouse.target=c;this.s.mouse.targetIndex=f("th",c.parentNode).index(c);this.s.mouse.fromIndex=this.s.dt.oInstance.oApi._fnVisibleToColumnIndex(this.s.dt,
Thanks
Andy