this is the xml i have loaded :
[…]
and this is the configuration :
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath(’<?= $mosConfig_live_site ?>/includes/js/dhtmlxgrid/codebase/imgs/’);
mygrid.setHeader(’<?=addslashes($grid_col)?>’);
mygrid.setInitWidths(’<?=$grid_col_width?>’);
mygrid.setColAlign(’<?=$grid_col_align?>’);
mygrid.setColTypes(’<?=$grid_col_types?>’);
mygrid.setColSorting(’<?=$grid_col_sorting?>’);
mygrid.enableAlterCss(‘even’,‘uneven’);
mygrid.enableAutoHeigth(true);
mygrid.enableMultiline(true);
mygrid.init();
mygrid.setSkin(‘light’);
mygrid.setOnCheckHandler(doOnCheck);
mygrid.loadXML(’<?= $mosConfig_live_site ?>/xml_trees/<?= $actFileName ?>’, function(){
mygrid.attachHeader(’<?=$grid_col2?>’);
document.getElementById(‘c_u’).appendChild(document.getElementById(‘c_u_box’).childNodes[0]);
mygrid.setSizes();
mygrid.setOnGridReconstructedHandler(onGridReconstructed);
where $grid_col_align is center,center,left,left,left,left,left,left,left,left,left,left,left,left,left,left,center,center
Yet, in the first column (and the rest), only the header is centered . I also need for the rest of the cells of the column to be centered
Please check attached sample - it uses the same XML data and the same grid initialization code - but works correctly.