SplitAt & onBeforeSorting Issues

We are using the Pro v16 and I’m trying to use the splitAt as well was onBeforeSorting. I’m using IE 7.



I have 2 issues. The first issue is I cannot sort when I have the splitAt enabled. One of my columns is a checkbox. If I try and sort the columns that are split I get “Microsoft JScript runtime error: ‘this.hdr.rows.0.childNodes’ is null or not an object”. I tried adding the code to the dthmlxgrid.js file that is said on this post dhtmlx.com/docs/products/kb/ … s=splitat; however I get the same error.



My second issue is onBeforeSorting, when I check certain rows and click “Select” to sort by checkbox. It does not sort. I know I must be missing something here. I am recreating my data so I can retrieve the first thousand rows of the ordered data then displaying it back to the grid.





snippet of code below:





































function LoadGrid(){

tree = new dhtmlXTreeObject(treebox, “100%”, “100%”, 0);

tree.setImagePath(“dhtmlx/dhtmlxTree/codebase/imgs/”);



tree.loadXMLString(treeString, function() {

mygrid = new dhtmlXGridObject(‘masterlist’);

mygrid.setImagePath(“dhtmlx/dhtmlxGrid/codebase/imgs/”);



mygrid.setSkin(“modern”);

mygrid.enableSmartRendering(true, 50);



mygrid.enableEditEvents(true, true, true);

mygrid.attachHeader("#master_checkbox,#text_filter,#text_filter,#text_filter,#text_filter,");

mygrid.attachEvent(“onMouseOver”, doOnRowSelect);

mygrid.attachEvent(“onEditCell”, doCellChanged);

mygrid.attachEvent(“onRightClick”, distributeSelected);

mygrid.attachEvent(“onBeforeSorting”, sortGridOnServer);

mygrid.setDateFormat(“m-d-y”);

mygrid.enableColumnMove(true);

mygrid.enableAutoSizeSaving();

mygrid.enableOrderSaving();



mygrid.attachEvent(“onAfterCMove”, function(a, b) {

colId = mygrid.getColIndexById(“Security_Cd”);

mygrid.setSubTree(tree, colId, 0);

return true;

});





mygrid.setSubTree(tree, 6, 0);

mygrid.init();

mygrid.splitAt(4);

});

//}



mygrid.loadXMLString(xmlString);

mygrid.loadSizeFromCookie();

mygrid.loadOrderFromCookie();

window.status = “”;

}



function sortGridOnServer(ind, gridObj, direct) {

//if (ind != 0) {

if (direct == “asc”) {

orderBy = mygrid.getColumnId(ind);

orderDirection = “ASC”;

}

else {

orderBy = mygrid.getColumnId(ind);

orderDirection = “DESC”;

}

mygrid.clearAll();

NewLoadAssetList(false, 1)



//}

mygrid.setColSorting(“server,server,server,server,server,server,server,server,server,server,server,server,server,server,server,server,server,server,server,server”);

mygrid.setSortImgState(true, ind, direct);

}





The first issue is I cannot sort when I have the splitAt enabled. One of my columns is a checkbox. If I try and sort the columns that are split I get "Microsoft JScript runtime error: ‘this.hdr.rows.0.childNodes’ is null or not an object"
This issue was fixed at the latest version of dhtmlxGrid. Please contact dhtmlx.com/dhxdocs/doku.php?id=d … nector:toc