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:grouping [2012/06/14 13:11]
tony
wiki:grouping [2012/12/23 06:01]
dlwiii Typos
Line 1: Line 1:
 ====== Common rules ====== ====== Common rules ======
  
-Grouping is a way to group data by diffrent criteria. jqGrid ​support ​currently one level grouping.+Grouping is a way to group data by diffrent criteria. jqGrid currently ​supports ​one level of grouping.
  
-The simple way to group in jqGrid is to enable grouping with the grid option **grouping:​true** and define a field name on which grouping ​occur. The name should ​correspondent of the name in colModel +The simple way to group in jqGrid is to enable grouping with the grid option **grouping:​true** and define a field name on which grouping ​occurs. The name should ​correspond to  ​the name in colModel 
-The definituion ​is done with array //​groupField//​ which is a part of another grid option **groupingView**. ​+The definition ​is done with array //​groupField//​ which is a part of another grid option **groupingView**. ​
  
-It is important to note that if you want grouping to be correct, then the data should come from server to grid sorted by that field. When we are in local mode (the data is array) the data is grouped (sorted) automatically so there is no need to define additional sort column.+It is important to note that if you want the grouping to be correct, then the data should come from server to the grid sorted by that field. When we are in local mode (the data is an array) the data is grouped (sorted) automatically so there is no need to define ​any additional sort column.
  
 In order to inform the server that we want to have a grouped data, jqGrid add to the sidx parameter the  groupField name on which we group. This done only if we have enabled the grouping and the data is remote. ​ In order to inform the server that we want to have a grouped data, jqGrid add to the sidx parameter the  groupField name on which we group. This done only if we have enabled the grouping and the data is remote. ​
Line 24: Line 24:
 </​code>​ </​code>​
  
-then the request ​send to the server will look like this (using FireBug)+then the request ​sent to the server will look like this (using FireBug)
  
 {{:​wiki:​grouping.png|}} {{:​wiki:​grouping.png|}}

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