Categories | Question details Back To List | ||
Grid header serialization Using professional version v.2.1 build 90316 Before buying your product I was using Flexigrid. I had developed enhancements to Flexigrid to let me persist the user's grid configuration (width, hidden state, sort order, column order). I've managed to get almost everything working with dhtmlxGrid. However, I'm having trouble with two things: (1) When a user hides or shows a column with the header context menu I don't see any way to capture this event so that I might persist it. I saw in another post that there is no event for this action. Any chance of getting this added or finding a work around? (2) The width for hidden columns shows up as 0 when I call getColWidth(). This doesn't work so well for me since I want to persist whatever the column width was before it was hidden (which is also what it will be if shown again). I've currently written my own serialization code using getColWidth(), isColumnHidden() and getSortingState(). I also looked at using the serialization API but that doesn't seem to get me any further. It seems to contain the same information and is missing the same information. Otherwise I seem to be able to get dhtmlxGrid to do what I want. Thanks Answer posted on Aug 11, 2009 01:35 >>When a user hides or shows a column with the header context menu onColumnHidden event is generated when column hidden|shown in the grid, it can be catch by using attachEvent >>The width for hidden columns shows up as 0 when I call getColWidth() The only way is to use isColumnHidden and preserver previously saved value over new one, if column is hidden. ( you may try to use grid.initCellWidth[index] to get initial size of column , it will work for both hidden and visible columns ) |