Author Topic: How to display only the value of the summary  (Read 3261 times)

francis6425

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 12
    • View Profile
How to display only the value of the summary
« on: August 07, 2017, 06:29:34 pm »
Hi,

Currently when I set the column summary as follows

summary: {type: "sum"},
or
summary: {type: "sum", title:"{0}"},

It will always show Sum: xxx.xx

How can I remove the 'Sum:' from the summary cell and directly display the value instead.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to display only the value of the summary
« Reply #1 on: August 07, 2017, 11:01:34 pm »

francis6425

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to display only the value of the summary
« Reply #2 on: August 09, 2017, 06:57:21 pm »
I've tried using the following code but its not working. Did i enter anything wrong ?

{title: "Price", width: 100, dataType: "string", dataIndx: "price", align: "right", format: '$##,###.00',
summary: {type: "sum", summaryTitle: " {0}"},
filter: {type: 'textbox', condition: 'begin', listeners: ['change']}
}


francis6425

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to display only the value of the summary
« Reply #3 on: August 09, 2017, 07:21:30 pm »
Sorry, ignore my previous post.
Finally found out how to use it.

                    var obj = {height: '100%', width: '100%', hwrap: false,
                        summaryTitle:{avg:"Avg: {0}",count:"Count: {0}",max:"Max: {0}",min:"Min: {0}",sum:"{0}"},
                        colModel: colM,
                        dataModel: {type: 'local', recIndx: "id", data: response.data}
                    };
                    $grid = $("#grid1").pqGrid(obj);