Categories | Question details Back To List | ||
Column Drag and Drop with Smart Rendering Error Hi, I'm getting the following error when enabling column drag and drop when using smart rendering: this._col_combos is undefined moveColumn()(3, 0, undefined)getfile....d_mcol.js (line 12) _addColInRow()(3, 0)getfile....d_mcol.js (line 13) _stopColumnMove()(mouseup clientX=444, clientY=384)getfile....d_mcol.js (line 27) [Break on this error] this._cCount++;this._cMod++;this._maste...Ind];for (var j=oldInd;j>(newInd+1);j--) This is my script code: function createGrid(url) { mygrid = new dhtmlXGridObject('table_container'); mygrid.enableColumnMove(true); mygrid.setImagePath("/content/lib/dhtmlx/2/dhtmlxGrid/codebase/imgs/"); mygrid.setSkin("platinum_manager"); mygrid.enableRowsHover(true,'grid_hover'); #if (!$MaximumRows) $MaximumRows = 20; #end mygrid.enableAutoHeight(true, 20 * $MaximumRows); mygrid.enableAlterCss("even","uneven"); mygrid.preventIECaching(true); mygrid.attachEvent("onBeforeSorting",onBeforeSort); mygrid.load(url); mygrid.attachEvent("onBeforeCMove",function(sInd,tInd){ return true; }); mygrid.init(); } And XML loaded: <rows total_count="11" pos="0"> − <head> <afterInit/> <column width="100" type="ro" sort="server">Domain</column> <column width="80" type="ro" sort="server">TLD</column> etc... − <afterInit> − <call command="setSortImgState"> <param>true</param> <param>0</param> <param>asc</param> </call> </afterInit> − <afterInit> − <call command="enableSmartRendering"> <param>true</param> <param>50</param> </call> </afterInit> </head> </rows> XML for sending data: <rows total_count="11" pos="0"> − <row id="1"> <cell>domain1.co.uk</cell> <cell>co.uk</cell> etc... <cell>mkt</cell> <cell>MICKEY WEINSTOCK & CO NV</cell> <cell>ns1.ascio.net, ns2.ascio.net</cell> <cell/> </row> etc... </row> Can you help resolving this issue? Thanks Answer posted by Support on Aug 13, 2008 03:26 Unfortunately problem can't be reconstructed locally. The sample with same code works correctly in case of local samples. Latest version of "mcol" extension sent by email. If error still occurs - please provide any kind of sample where issue can be reconstructed. Answer posted by Chris Wood on Aug 13, 2008 04:56 Hi, I was able to resolve this issue by adding some code into the column moving JS file to check if a combo column exists before trying to check the length of it's items. This solved the null refernce error that was occuring. Thanks, Chris Answer posted by Support on Aug 14, 2008 02:13 If possible - please send updated js file to support@dhtmlx.com, so we will be able to integrate necessary changes in next version of grid. |