dhtmlxGrid v2 pro / problems with splitAt() function, combin

Hi,



I’ve problem while I’m trying to use splitAt() on a column.

Grid contains fixed size columns, headers and footers, text_filters and paging-mode, it’s loaded by a parse() method on a jsarray.

Problem: the 2 first columns disappears, or aren’t displayed correctly as soon as I use splitAt().

splitAt() is called after init() of grid, but I don’t know if It should be called after or before attachFooter; but in all cases, it’s not working.

Code:

"

















//

    my_grid = new dhtmlXGridObject(‘mygrid’);

    my_grid.setImagePath("…/dhtml/grid/codebase/imgs/");

    my_grid.setHeader([…]);

    my_grid.setInitWidths(“0,50,140,250,250,140,140”);

    my_grid.setColAlign(“left,center,left,left,left,left,left”);

    my_grid.setSkin(“light”);

    my_grid.setColSorting(“int,na,str,str,str,str,str”);

    my_grid.setColTypes(“ro,ch,ro,ro,ro,ro,ro”);

    my_grid.attachHeader([…]);

    my_grid.attachEvent(…);

    my_grid.init();

    my_grid.splitAt(2);

    my_grid.attachFooter([…]);

//etc…load with parse on jsarray, and enablePaging()

"



Thanks.

my_grid.attachFooter([…]); need to be moved before splitAt command
enablePaging code not shown in your snippet - but need to be moved before splitAt as well.

The problem which you have described - the 2 first columns disappears - occurs when you are executing splitAt after data already loaded in grid.

Working sample sent by email. If problems still occurs for you - please send any kind of sample where problem can be reconstructed to support@dhtmlx.com


Hi,



Thanks for your answer and email, I’ve received it correctly but I didn’t had enough time to look at it before.



I still have the same problem, here’s the schema of the “action” on my grid:



"



 grid = new dhtmlXGridObject(‘grid’);
 grid.setImagePath("…/dhtml/grid/codebase/imgs/");
 grid.setHeader(…
 grid.setInitWidths(“50,65,140,250,250,140,140”);
 grid.setColAlign(“left,center,left,left,left,left,left”);
 grid.setSkin(“light”);
 grid.setColSorting(“int,na,str,str,str,str,str”);
 grid.setColTypes(“ro,ch,ro,ro,ro,ro,ro”);
 grid.attachHeader(…
 grid.attachEvent(“onCheckbox”,…
 grid.attachEvent(“onRowSelect”,…
 grid.attachEvent(“onRowCreated”,…
 grid.enablePaging(true,20,5,“pagingArea”,true,“recinfoArea”);
 grid.setPagingSkin(“bricks”);
 grid.init();
 grid.splitAt(2);
 grid.attachFooter(…
 grid.sortRows(2, “str”, “asc”);



"



In addition:



In the 2 rows of headers contains “active objects” as checkboxes, #text_filter and so on.



The footer row contains also objects as checkboxes, button, calculations.



I’ve tried to put the “splitAt()” method at diffferent places, but with no effect.



Thanks



Regards.

The only correction which need to be done - attachFooter need to be moved before splitAt ( or it will be applied to right part of grid only )
Except of this - the same code works correctly in local samples
Are you using dhtmlxgrid 2.0 or dhtmlxgrid 1.6 - there are few known issues with complex headers in split mode ( with row-colspan usage ), if you need latest fixes for 1.6 version - please contact us directly at support@dhtmlx.com

Also, please be sure that each row has unique ID, without it grid may render incorrectly in hardly predictable way.

Hi,

I’m using the dhtmlxGrid v2.0 “pro”, and I’ve already tried to call “attachFooter” before “splitAt”. The IDs of the rows aren’t specified, it’s true, in my jsarray string (I’m loading data with grid.parse(“aString”, “jsarray”)). What is the right syntax in that case for a jsarray? I’m going to try and see if I can use the same idea as the Json example (dhtmlx.com/docs/products/dhtmlxG … oadingdata).

Thx
Regards.


Hi



I’ve tried the “json” syntax in order to load the grid, attachFooter(…) is called before splitAt(…), but it’s still not working.



Thanks,