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
Next revision Both sides next revision
wiki:groupingheadar [2011/10/11 14:47]
tony
wiki:groupingheadar [2011/12/09 12:09]
thepyramus
Line 2: Line 2:
  
  
-Header grouping is a way to add additional ​column ​above the header grid rows, so that they are grouped ​of desired ​way.\\+Header grouping is a way to add  additional ​columns ​above the header grid rows, so that they are grouped ​in a way you need them.\\
 Typical implementation can look like the picture below. Typical implementation can look like the picture below.
 \\ \\
Line 64: Line 64:
  
 === setGroupHeaders options === === setGroupHeaders options ===
-The method creates the group of headers in the grid. If the method is called, after the creation of the grouping header we store the group headers options as grid parameter. This grid parameters is called **groupHeader** and can be requested with getGridParam method after it is run and there destroyGroupHeader ​is not called ​(see below). \\ \\ +The method creates the group of headers in the grid. If the method is called, after the creation of the grouping header we store the group headers options as grid parameter. This grid parameters is called **groupHeader** and can be requested with getGridParam method after it is run and there is no call of destroyGroupHeader method ​(see below). \\ \\ 
 The setGroupHeader method has the following options\\ The setGroupHeader method has the following options\\
  
 ^Property^Type^Description^Default^ ^Property^Type^Description^Default^
-|useColSpanStyle|boolean| Determine if the non grouping header cell should be have cell above it - falue of false or the column should be treated as one combining boot - true| false|+|useColSpanStyle|boolean| Determine if the non grouping header cell should be have cell above it - value of falseor the column should be treated as one combining boot - true| false|
 |groupHeaders|array| A set of object(s) which describes the header grouping texts and rules. Bellow is the list of the options of every element of this array| empty| |groupHeaders|array| A set of object(s) which describes the header grouping texts and rules. Bellow is the list of the options of every element of this array| empty|
  
Line 93: Line 93:
 </​code>​ </​code>​
 {{:​wiki:​grouping3.png|}} {{:​wiki:​grouping3.png|}}
 +
 +
 +===== Destroying group header =====
 +
 +To destroy group header call the **destroyGroupHeader** method. This method returns back the grid headers to its initial state.
 +
 +The method can be called like this:
 +
 +<code javascript>​
 +...
 +jQuery("#​grid"​).jqGrid('​destroyGroupHeader'​);​
 +...
 +</​code>​
 +
 +
 +The method has optional one parameter. The parameter is boolean and its default state is true. If the parameter is set to false like :
 +<code javascript>​
 +...
 +jQuery("#​grid"​).jqGrid('​destroyGroupHeader',​ false);
 +...
 +</​code>​
 +
 +it restores the initial grid header, but does not destroy the grouping header options from which the group header is created. With other words the last group header parameters can be used later instead that the group header is destroyed ​
 +
  

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