ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: francis6425 on August 07, 2017, 06:29:34 pm

Title: How to display only the value of the summary
Post by: francis6425 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.
Title: Re: How to display only the value of the summary
Post by: paramvir on August 07, 2017, 11:01:34 pm
Please use summaryTitle option: https://paramquery.com/pro/api#option-summaryTitle
Title: Re: How to display only the value of the summary
Post by: francis6425 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']}
}

Title: Re: How to display only the value of the summary
Post by: francis6425 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);