0

How can i merge the rows data with jqGrid plugins like here description's image

tereško
  • 58,060
  • 25
  • 98
  • 150
Messi007
  • 11
  • 4
  • Look at [the old answer](http://stackoverflow.com/a/12294020/315935) – Oleg Apr 03 '16 at 20:28
  • in this example the data is static, in my case i fetch data dynamically from sql server – Messi007 Apr 04 '16 at 14:16
  • What you mean "static data"? You should clear describe what you did till now and how you use jqGrid (`datatype`, `loadonce`, test data). The example from the old answer uses sorted data with additional attributes set in the input items. Can you prepare such additional attributes on the server or to set the attributes in the local data *before* filling the grid? – Oleg Apr 04 '16 at 15:40
  • I load data from controller (asp.net mvc) and i pass to the js code of the jqGrid the url (via dataurl) the datatype is JSON – Messi007 Apr 04 '16 at 17:38
  • If you load the data from the server and need to display with merged rows then the HTML table should use `rowspan`. Thus one should first sort the data and then calculate the number of rows in every column which can be merged, starting with the first row. It's much more effective to do this in the server code. During the analysis you can get all required information and set the properties `attr` and `state` which can be directly used by `cellattr` callback of jqGrid (see [the referenced above answer](http://stackoverflow.com/a/12294020/315935)). – Oleg Apr 04 '16 at 19:03

0 Answers0