문제

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)

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top