Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:frozencolumns [2011/12/12 12:53]
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 68: Line 68:
 jQuery("#​grid"​).jqGrid('​setFrozenColumns'​);​ jQuery("#​grid"​).jqGrid('​setFrozenColumns'​);​
 </​code>​ </​code>​
 +
 +
 +===== Destroy =====
 +
 +It is possible to destroy the frozenColumns in the grid using the method **destroyFrozenColumns**. This method restores the grid configuration before calling the setupFrozenColums
 +
 +<code javascript>​
 +jQuery("#​grid"​).jqGrid('​destroyFrozenColumns'​);​
 +</​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
  

QR Code
QR Code wiki:frozencolumns (generated for current page)