Announcement

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

    Problem with ListGrid.SetSortState and new Records

    Hi Isomorphic,

    ListGrid.SetSortState has no effect on new records.

    there are 4 small steps to reproduce this behavior.

    1) insert this code into BuiltInDS after ListGrid creation.
    Code:
    boundList.setSortState("({fieldName:\"Name\",sortDir:\"ascending\",sortSpecifiers:[{property:\"Name\",direction:\"ascending\"}]})");
    2) click at employees Datasource. (all records are sorted by Name as aspect)
    3) click NEW button
    4) fill Name with "accc", EmployeeID with 400 and Manger with 192 and click SAVE

    As you can see the new record is quite appear at the top of the grid and not between "Abigail Meyler" and "Ai Hong".

    is used: Isomorphic SmartClient/SmartGWT Framework (v9.1p_2014-03-18/PowerEdition Deployment 2014-03-18) with FF 23.0.1

    Best Regards,
    Mirko

    #2
    Hi Mirko,

    please search the forums. As far as I recall this is expected behaviour for sorted ListGrids in general (not limited to setSortState()) because otherwise new records might pop out of sight.
    You can always call ListGrid.sort() again.

    Best regards,
    Blama

    Comment


      #3
      No need for forum search, it's right in the Grid Editing overview.

      Comment

      Working...
      X