Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Possible bug in ListGrid._saveLocally

$
0
0
Hi,

I am having problems saving a record locally in a grid that uses a ResultSet to store its date, and I think the root cause is in the _saveLocally function of ListGrid.js, in this excerpt:

Code:

        if (isc.ResultSet && isc.isA.ResultSet(data)) {
            if (data.allRows != null) {
                data.allRows.add(data);
                data.filterLocalData();
            } else {
                this.logWarn("Unable to add data to resultSet - allRows is not set");
            }
        } else {
            data.add(newValues);
            data.dataChanged();
        }

data (a ResultSet) is being added to data.allRows, and at no point newValues (an object containing all the new values declared earlier in the code) is added to data.allRows. I think the previous code should look like this:

Code:

        if (isc.ResultSet && isc.isA.ResultSet(data)) {
            if (data.allRows != null) {
                data.allRows.add(newValues);
                data.filterLocalData();
            } else {
                this.logWarn("Unable to add data to resultSet - allRows is not set");
            }
        } else {
            data.add(newValues);
            data.dataChanged();
        }

This code solves my problem in my local instance. Currently I am working with the version v10.0d_2014-02-13/LGPL Development Only.

With regards,

Martin

Viewing all articles
Browse latest Browse all 4756

Trending Articles