Announcement

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

    MultiSort Bug in ListGrid.js (with patch)

    In the current LGPL nightly build, there is a problem getting MultiSort working with ListGrids if you specify the dataSource property as a string ID (rather than a DataSource object).

    The problem is that the code is calling this.dataSource.canMultiSort. Of course, if this.dataSource is a string, that doesn't work.

    I have pasted in a patch below ... it is a simple patch, so hopefully it will make sense even if the formatting gets mangled. Essentially, it calls this.getDataSource() instead of this.dataSource

    --- ListGrid.js.orig 2010-12-01 17:37:01.000000000 -0600
    +++ ListGrid.js 2010-12-01 17:39:52.000000000 -0600
    @@ -9624,8 +9624,8 @@
    // if data doesn't support setSort (resultSet and Array do), disable multiSort
    if (!this.data.setSort)
    this.canMultiSort = false;
    - else if (this.dataSource && this.canMultiSort != false)
    - this.canMultiSort = this.dataSource.canMultiSort;
    + else if (this.getDataSource() && this.canMultiSort != false)
    + this.canMultiSort = this.getDataSource().canMultiSort;
    var sortSpecifiers = this.getSort();
    if (sortSpecifiers) this.setSort(sortSpecifiers);

    #2
    Thanks, applied the patch, it will be in the next nightly build.

    Comment

    Working...
    X