0

in the trirands jqGrids's pivot table has a table called many summary values

in it, it uses the following json data

{ 
  "rows":[
    {
        "CategoryName":"Beverages",
        "ProductName":"Steeleye Stout",
        "Country":"UK",
        "Price":"1008.0000",
        "Quantity":"65"
    },{
        "CategoryName":"Beverages",
        "ProductName":"Laughing Lumberjack Lager",
        "Country":"USA",
        "Price":"140.0000",
        "Quantity":"10"
    },{
        "CategoryName":"Beverages",
        "ProductName":"Guarana Fantastica",
        "Country":"USA",
        "Price":"724.50",
        "Quantity":"10"
    }


]} 

Assume i'm sending something similar to above data from DB, in the sample on trirand website shows that are two columns with Captions Price and Qty. But assume i only need the price column and in that price column header instead of printing the caption price i want to print the value in the Price property of above data. so if teh json has 12 objects there will be 12 price columns but those price columns will have the value of the prices printed on the column header caption like this:

enter image description here

Barmar
  • 741,623
  • 53
  • 500
  • 612
NP Neil Footy
  • 75
  • 1
  • 10
  • it's important to include the information about the version and the fork of jqGrid which you use (or can use). I develop [free jqGrid](https://github.com/free-jqgrid/jqGrid) fork. You can find the detailed description of all the possibilities of `jqPivot` in [the wiki article](https://github.com/free-jqgrid/jqGrid/wiki/jqPivot-in-version-4.9). – Oleg Sep 18 '16 at 10:44
  • @Oleg im using trirand free version 4.6 the cdn is https://cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/jquery.jqGrid.min.js im currently working on a simple grid but i'll be greateful if someone could show me how to do the pivot as on my OP – NP Neil Footy Sep 18 '16 at 11:53

0 Answers0