splitAt()

With splitAt(1) specified, I get an intermittent problem (on page refresh or load) where the frozen section of the treegrid is initially displayed, then the content disappears. The non-frozen section content remains visible.



I’m firing splitAt(1) from an onload event. I tried it after the myTreeGrid.init() (see below), but that removed the frozen section altogether. It seems as though the splitAt(1) somehow causes the frozen section content to disappear/hide as it performs the split.



Here’s the code:





//** Set up the context menu

    myMenu = new dhtmlXMenuObject(null,“standard”);



    myMenu.loadXML(“project_option_context_menu.xml”);





//** Set up the Tree Grid

    myTreeGrid = new dhtmlXGridObject(‘gridbox’);

    myTreeGrid.setImagePath("./dhtmlxGrid/codebase/imgs/icons_greenfolders/");

    myTreeGrid.setHeader(“Project / Option,id,Sub Programme,R&VI3,R&VI4,R&VI5,Type,Class,Details,Created by,Created,Last updated by,Updated”);

    myTreeGrid.setInitWidths(“300,30,200,100,100,100,120,120,200,200,150,200,150”)

    myTreeGrid.setColAlign(“left,right,left,right,right,right,left,left,left,left,left,left,left”)

    myTreeGrid.setColTypes(“tree,ro,co,ro,ro,ro,co,co,txt,ro,ro,ro,ro”);

    myTreeGrid.setColumnIds(“label,id,subProgramme,rvi3,rvi4,rvi5,type,class,details,createdBy,created,updatedBy,updated”)

    myTreeGrid.setSkin(“light”);

    myTreeGrid.enableRowsHover(true,‘grid_hover’);

    myTreeGrid.setColSorting(“str,int,str,int,int,int,str,str,str,str,str,str,str”)

    myTreeGrid.enableContextMenu(myMenu);

    myTreeGrid.preventIECaching(true);

    myTreeGrid.attachEvent(“onBeforeContextMenu”,onShowContextMenu);

    

// Sub Programme Generate this list from db

    var comboboxSubProg = myTreeGrid.getCombo(2);

    …



// Project Type Generate this list from db

    var comboboxType = myTreeGrid.getCombo(6);

    …



// Project Class Generate this list from db

    …



    myTreeGrid.init();

    myTreeGrid.loadXML(“project_option_get_rows.php”);

    

//=====================================================

    myDataProcessor = new dataProcessor(“project_option_update.php”);

    myDataProcessor.enableDebug(true);

    myDataProcessor.enableDataNames(true);

    myDataProcessor.setVerificator(0,checkIfNotEmpty)

    myDataProcessor.setVerificator(2,checkIfNotEmpty)

//    myDataProcessor.setVerificator(3,checkIfNotZero)

    myDataProcessor.setUpdateMode(“off”);//available values: cell (default), row, off

    myDataProcessor.defineAction(“error”,myErrorHandler);

    myDataProcessor.setTransactionMode(“GET”);



    myDataProcessor.setOnAfterUpdate(function(nodeId,cType,newId){

        doLog("Item was "+cType+"ed. Item id is " + newId);myTreeGrid.selectRowById(newId);

    });



    myDataProcessor.init(myTreeGrid);

//======================================================





Thanks and regards

Mark

In case of dhtmlxgrid 1.6 or earlier, the splitAt command must be called only after grid.init

myTreeGrid.init();
myTreeGrid.splitAt(1);
myTreeGrid.loadXML(“project_option_get_rows.php”);

>>It seems as though the splitAt(1) somehow causes the frozen section content to disappear/hide as it performs the split.
Such effect may occur if you are calling splitAt after data loading in grid, in such case, for loaded data , only right part will be visible.


Apart from the dataprocessor which says it’s version is //v.1.0 build 80512, all other included js files say they are //v.2.0 build 81009



Here’s what’s included:

















>>Such effect may occur if you are calling splitAt after data loading in grid, in such case, for loaded data , only right part will be visible.
Even if I do…:
  myTreeGrid.init(); 
  myTreeGrid.splitAt(1); 
  myTreeGrid.loadXML(“project_option_get_rows.php”);
…all I see are the columns after the split column.



I’m wondering if this might be a browser-specific issue.  I’m using IE6.



 



 

I’m wondering if this might be a browser-specific issue. I’m using IE6.
Version which you are using works correctly for IE6 in local tests.

>>myTreeGrid.loadXML(“project_option_get_rows.php”);
By any chance, is it possible, that php feed return not only the data but the section as well ? ( in such case reinit of grid will occur which can cause different errors for grid in split mode )

Working sample with the same codebase sent by email.