setColumnHidden and header is still visible

v1.5



I think there is something wrong with grid initialization/column hiding:



        mygrid = new dhtmlXGridObject(‘gridbox’);

        mygrid.setImagePath("/script/codebase/imgs/");

        mygrid.setSkin(“xp”);

        mygrid.preventIECaching(true);

        mygrid.setCSVDelimiter("\t");        

        mygrid.enableBlockSelection(true);

        mygrid.setMultiselect(true);

        mygrid.enableAutoWidth(true);

     mygrid.init();

     mygrid.loadXML(“data_xml.php”);

        mygrid.setColumnHidden(0,true);





xml is:







ID

Identyfikator

Typ

Nazwa typu





1

FO

FOO

FOOO







and as a result, first column itself is hidden, but header for this column is still visible.



this.hdr.rows[1] has no properties

localhost/script/codebase/dhtmlxgrid.js

Line 277





I have to mention that if I send XML with tag like this:



    

0

true







then first column is hidden correctly. Moreover (i’m not sure if it’s bug) but if I send more than one setColumnHidden with XML then only first one is executed.

Correct code is
    mygrid.loadXML(“data_xml.php”,function(){
            mygrid.setColumnHidden(0,true);

    });


The loading is asyn, so you can’t call a command just after loadXML, you need to catch the moment when data will be really loaded.

>>if I send more than one setColumnHidden with XML
The next must work correctly


    0true

    1true

     … any other call commands here …