I have a jqgrid with 2 frozen columns. Frozen works fine if I do not anything. After I hide/show another columns (not frozen columns) frozen is not working.
I use free jqGrid version 4.14.0
I don't know what happen.
Can anyone help me! Thanks in advance..
If you use low-level methods
showCol,hideCol,showHideColdirectly then you should choose yourself which one from two solution ways provides the best performance in your case.Showing/hiding of columns is relatively slow, because all rows of the grid, column headers (inclusive the filter toolbar) need be looked through and the inline css style on the corresponding cells be changes (
displayproperty should be set tononeor thenonevalue should be removed). After that the with and the height of the grid could be changed too. If the grid has frozen columns, then the same should be done in the frozen dives. Additionally the width and the height of frozen dives should be recalculated and the height of every row of the frozen columns should be recalculated too.Thus one have two alternatives:
showCol,hideCol,showHideColand then triggerjqGridResetFrozenHeightsevent on the grid to force recalculation of all width/height properties of frozen divesdestroyFrozenColumns, apply hiding/showing the columns by calling ofshowCol,hideCol,showHideColand to recreate frozen columns once more by call ofsetFrozenColumns.I recommend you to make some tests to choose, which one from the above two ways provides the best performance in your application.