Footer and Split problems

dhtmlxgrid_filter.js

dhtmlxgrid_splt.js



I wanted to see if splitting is doable when I have added a filter to a grid.



Adding a footer using attachFooter(…) and calling splitAt(X) after the init seems to be causing problems. But if I comment out the attachFooter() call, the grid renders fine with the split.



We are using

dhtmlxGrid v.1.6 Professional edition build 80512/80603



Thanks



In dhtmlxgrid 1.6 filters and split can be used in same time.

>>Adding a footer using attachFooter(…) and calling splitAt(X) after the init seems
Please be sure that attachFooter command was executed before splitAt - this is the only requirement.

If you still has issues with such functionality , please provide a code snippet , which causes problems.

Here is the code used to render the Grid

    grid= new dhtmlXGridObject(‘tab_1_0’);
    grid.setImagePath(‘scripts/dhtmlxGrid/codebase/imgs/’);
    grid.setSkin(“xp”);
    grid.enableCollSpan(true);
    grid.setHeader(“Title,Start Date,End Date,Difference,Fee,Cost”);
    grid.setInitWidths(“100,100,100,100,100,100”);
    grid.setColAlign(“center,center,center,center,center,center”);
    grid.setColTypes(“ro,ro,ro,price,price,price”);
    grid.setColSorting(“str,int,int,int,int,int”);
    grid.setEditable(false);
    grid.enableAutoHeight(true);
    grid.attachFooter(“Totals,#cspan,#cspan,${#stat_total},${#stat_total},${#stat_total}”,
                [,‘text-align:center’,‘text-align:center’,‘text-align:center’]);   
    grid.init();
    grid.splitAt(1);

Commenting out grid.splitAt(1) lets the Grid render, if not I get a “type mismatch” error according to my target browser (IE 7)

You are using incorrect values in attachFooter command - the columns 1-3 combined in colspan in your case, and in same time you are using split at column 1 ( the split must not intersect colspans )
To fix problem just update command as

grid.attachFooter(“Totals, ,#cspan,${#stat_total},${#stat_total},${#stat_total}”,
[,‘text-align:center’,‘text-align:center’,‘text-align:center’]);

That makes sense, thanks!