except for the setcolalign-value. I want to set a predefined setcolalign for all my columns, as I don’t know the number of columns I will have, because these will automatically be generated by some Java-classes
There is no way to set alignment for all columns. setColAlign() method is called after HTML table already generated, right? So by the time of script execution you already know number of columns in grid.
This example worked perfect in my hardcoded HTML-page, but then I used
mygrid = new dhtmlXGridObject(‘mygrid_container’);
and now I use
grid = new dhtmlXGridFromTable(‘result_table’);
Is there a difference somehow that causes the setcolalign function to not work anymore?
setColAlign() method should be called before grid initialization. In case of initialization from HTML table, init() method is called when you initialize grid object (dhtmlXGridFromTable). To call setColAlign() before initialization of the grid you should use following code: