Categories | Question details Back To List | ||
dhtmlxGrid v2 pro / problems with splitAt() function, combined with paging 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: " <script src=".../dhtml/grid/codebase/dhtmlxgrid.js"></script> <script src=".../dhtml/grid/codebase/ext/dhtmlxgrid_filter.js"></script> <script src=".../dhtml/grid/codebase/ext/dhtmlxgrid_group.js"></script> <script src=".../dhtml/grid/codebase/ext/dhtmlxgrid_pgn.js"></script> <script src=".../dhtml/grid/codebase/ext/dhtmlxgrid_srnd.js"></script> <script src=".../dhtml/grid/codebase/ext/dhtmlxgrid_splt.js"></script> <script src=".../dhtml/grid/codebase/dhtmlxgridcell.js"></script> // 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. Answer posted by Support on Oct 16, 2008 06:52 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 Answer posted by Sunchaser on Oct 16, 2008 15:17 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'); " 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. Answer posted by Support on Oct 17, 2008 05:17 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. Answer posted by Sunchaser on Oct 19, 2008 03:33 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 (http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Loading_data_in_grid.html#grid_art_loadingdata). Thx Regards. Answer posted by Sunchaser on Oct 20, 2008 08:39 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, |