Search code examples
extjsgridnansummary

extjs grid summary row, got concated Strings


I am trying to get the summary of a column, followed an example, summary row is there, but the cell values are concatenated Strings...

For example, with cell values in a column "6","0","0" i get "600" in the summary.

In grid declaration i put

features: {ftype: 'summary'}

and in column declaration:

summaryType: 'sum'

I know that javascript handles values as a String, i tried embracing it with parseInt(value)

summaryRenderer: function (value, summaryData, dataIndex) {
    return parseInt(value);
}

but no effect, what i am doing wrong?

(strangely, In the examples, it works without parseInt)


Solution

  • Out of interest, is the type property for the field in question set to int on your model?

    Incidentally also see here on the Sencha forum