Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Sorting calculated field in ListGrid is not performed correctly

    Hello,

    Firefox, 3.6.13, SmartGWT Power 2.4 (the released one)

    I use the .setCellFormatter method to format cells, and actually doing some calculations of other cells of the same row.

    Somehow, when I sort on this column, the results are not correct.
    Is the sorting done on the eventual, post-calculated, values? This is what I hope :-)

    So I created two columns, one being a calculated field, other a plain text-field, where I would enter the SAME values. Sorting on the non-calculated, plain-text field works, sorting on the calculated one doesn't.

    Values:
    0,01 MW
    0,10 MW
    1,00 MW

    This sorts well if it is plain text, but doesn't in the calculated field, using setCellFormatter.

    Any thoughts why this happens?

    In dev mode, the sorting is incorrect, in web mode the calculated column doesn't sort at all.

    #2
    If the value to use to sort differs from the value in the record, define a SortNormalizer for the field.

    Comment

    Working...
    X