Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:frozencolumns [2011/12/12 13:01] tony |
wiki:frozencolumns [2017/12/09 14:51] (current) admin |
||
---|---|---|---|
Line 8: | Line 8: | ||
<code javascript> | <code javascript> | ||
- | .. | + | ... |
jQuery("#grid").jqGrid({ | jQuery("#grid").jqGrid({ | ||
... | ... | ||
Line 78: | Line 78: | ||
</code> | </code> | ||
+ | ===== Dynamic setup ===== | ||
+ | |||
+ | It is possible to change the frozen columns dynamically. In this case it is needed to call first **destroyFrozenColumns** method setup new frozen proerties and call again setFrozenColumns. | ||
+ | |||
+ | Below example tell how to do this, making the invdate column frozen: | ||
+ | |||
+ | |||
+ | <code javascript> | ||
+ | jQuery("#mybutton").click(function(){ | ||
+ | jQuery("#grid") | ||
+ | .jqGrid('destroyFrozenColumns'); | ||
+ | .jqGrid('setColProp','invdate', {frozen:true}); | ||
+ | .jqGrid('setFrozenColumns'); | ||
+ | .trigger('reloadGrid', [{current:true}]); | ||
+ | }); | ||
+ | </code> | ||
+ | |||
+ | <note>Currently in order to refresh the frozen column(s) we need to call trigger('reloadGrid'). Later this will be changed with more easy way.</note> | ||
+ | |||
+ | ===== Limitations ===== | ||
+ | |||
+ | The following limitations tell you when frozen columns can not be set-up | ||
+ | |||
+ | * When TreeGrid is enabled | ||
+ | * When SubGrid is enabled | ||
+ | * When cellEdit is enabled | ||
+ | * When inline edit is used - the frozen columns can not be edit. | ||
+ | * When sortable columns are enabled - grid parameter //sortable// is set to true or is function | ||
+ | * When scroll is set to true or 1 | ||
+ | * When Data grouping is enabled | ||
+ | * When footer row (footerrow paremeter) is enabled | ||