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:36]
tony
wiki:groupingheadar [2011/10/11 14:47]
tony
Line 64: Line 64:
  
 === setGroupHeaders options === === setGroupHeaders options ===
-The setGroupHeader method has the following 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 setGroupHeader method has the following options\\
  
 ^Property^Type^Description^Default^ ^Property^Type^Description^Default^
Line 76: Line 77:
 |numberOfColumns|integer| The number of columns which are included for this group. Note that  the number start from the startColumnName. If the column is hidden it is skipped and as result the group does not contain the field, but the method count it.| |numberOfColumns|integer| The number of columns which are included for this group. Note that  the number start from the startColumnName. If the column is hidden it is skipped and as result the group does not contain the field, but the method count it.|
 |titleText| string| The text for this group. The text can contain html tags| |titleText| string| The text for this group. The text can contain html tags|
 +
 +
 +Using the previous example if we change the **useColSpanStyle** to true we will obtain the following picture:
 +
 +<code javascript>​
 +...
 +jQuery("#​grid"​).jqGrid('​setGroupHeaders',​ {
 +  useColSpanStyle:​ true, 
 +  groupHeaders:​[
 + {startColumnName:​ '​amount',​ numberOfColumns:​ 3, titleText: '<​em>​Price</​em>'​},​
 + {startColumnName:​ '​closed',​ numberOfColumns:​ 2, titleText: '​Shiping'​}
 +  ]
 +});
 +...
 +</​code>​
 +{{:​wiki:​grouping3.png|}}
 +

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