Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Mar 18, 2008 05:32
open dhtmlx forum
footer for dynamically changing columns

I have a grid in which the number of columns change dynamically. I am trying to use the footer but from what i understand the footer display is dependent on the number of visible columns for example:

mygrid.attachFooter("Total:,<div id='total'>0</div>,ODA:,<div id='oda>0</div>",["text-align:left;"]);");

If my grid has 4 columns the above footer would be displayed correctly. But if the number of columns changes to 3 then the <div id='oda'>0</div> would not be visible. How can I overcome this problem? Can I have a footer which is independent of the number of columns?
Answer posted by Support on Mar 18, 2008 06:15
It not possible, count of cells in footer must be equal to count of columns , by default footers cells deleted|added automatically while adding|deleting columns
If necessary you can dynamically reattach footer after changing column count

    grid.detachFooter(0);
    grid.attachFooter( ... new one .. );