DHTMLXGrid

Hi,



I am facing a problem while running this code:



    mygrid1 = new dhtmlXGridObject(‘gridbox1’);

                mygrid1.setImagePath("<%= request.getContextPath() %>/JavaScript/DHTMLGrid/imgs/");

                mygrid1.setHeader(“AHECC Code, Permit Required, Assay Required , Goods Description,Goods Origin Code,Goods Origin Country Code, Goods Origin Country Code1, Goods Origin Country Code2, Goods Origin Country Code3,Temprorary Import No,Net Quantity,Net Unit,Gross Weight,Gross Weight Unit,FOB Value,Permit Number,Code,Assay Element Concentration,Unit,Permit Number,Code,Assay Element Concentration,Unit,Permit Number,Code,Assay Element Concentration,Unit,Permit Number,Code,Assay Element Concentration,Unit,Permit Number,Code,Assay Element Concentration,Unit,Permit Number,Code,Assay Element Concentration,Unit,Permit Number,Code,Assay Element Concentration,Unit,Permit Number,Code,Assay Element Concentration,Unit,Permit Number,Code,Assay Element Concentration,Unit,Code,Assay Element Concentration,Unit,Code,Assay Element Concentration,Unit,Code,Assay Element Concentration,Unit,Code,Assay Element Concentration,Unit,Code,Assay Element Concentration,Unit,Code,Assay Element Concentration,Unit”);

                mygrid1.enableResizing(“false, false, false,false, false, false,false, false, false,false, false, false, false,false, false, false,false, false, false,false, false, false, false,false, false, false,false, false, false,false, false, false, false,false, false, false,false, false, false,false, false, false, false,false, false, false,false, false, false,false, false, false, false,false, false, false,false, false, false,false, false, false, false,false, false, false,false, false, false,false, false, false, false,false, false, false,false, false, false,false, false, false, false, false, false,false, false, false”);

                mygrid1.setInitWidths(“100,100,100,200,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0”);

                mygrid1.setColAlign(“left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left”);

                mygrid1.setColTypes(“ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro”);

                mygrid1.enableAlterCss(“grid-even”,“grid-uneven”);

                mygrid1.setScrollbarWidthCorrection(16);

                //mygrid1.addRow(Date.parse(new Date()),‘fieldName,andOr,fieldValues’,0);

                mygrid1.init();





Actually i dont want to display those columns whose init widths are set to zero. Whwn execution,sometimes it comes with only those columns whose with are more than zero,but sometimes it comes with mixed with all columns.

How can i sort it out.i dont want to display those columns whose sizes are zero but they should be invisible so that i can set their values.



Thanks in advance

dhtmlxGrid support “invisible column”, you can mark column as hidden one by one by
    grid.setColumnHIdden(index,true);

or all columns at once
    grid.setColHidden(“true,false,false,false,false,true”); // true - means hidden