Roman
Roman

Reputation: 171

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)

Upvotes: 1

Views: 1588

Answers (1)

SW4
SW4

Reputation: 71160

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

Upvotes: 1

Related Questions