I have a ResultSet and I'd like to be notified about data changes triggered by the underlying data source and reflected (among others) into that resultset.
At event handler to the cache changes thread you suggested
in order to be notified of cache changes.
So I've tried using a ResultSet with emtpy initialData, but changes are not notified through DataChanged event handler.
This is fully reproducible using the current SmartClient showcase Grid Data bound update, simply adding a secondary grid showing contents from an empty resultset which is configured to use the same datasource as the primary grid.
When you modify the continent for a record on the original grid, that record is added to the second grid, but the dataarrived function is not called at all.
Follows a snippet to be added to the existing databoundUpdate.js code in order to reproduce the issue
At event handler to the cache changes thread you suggested
to create a ResultSet that is provided empty initialData, and implement a DataChanged event handler.
So I've tried using a ResultSet with emtpy initialData, but changes are not notified through DataChanged event handler.
This is fully reproducible using the current SmartClient showcase Grid Data bound update, simply adding a secondary grid showing contents from an empty resultset which is configured to use the same datasource as the primary grid.
When you modify the continent for a record on the original grid, that record is added to the second grid, but the dataarrived function is not called at all.
Follows a snippet to be added to the existing databoundUpdate.js code in order to reproduce the issue
Code:
... isc.ResultSet.create ({ ID: "countryResultSet", dataSource: worldDS, initialData: [], dataArrived: function (startRow, endRow) {isc.say ("data arrived: "+startRow+","+ endRow);} }) isc.ListGrid.create({ ID: "countryList2", left: 600, width:500, height:224, alternateRecordStyles:true, data: countryResultSet, // display a subset of fields from the datasource fields:[ {name:"countryCode"}, {name:"countryName"}, {name:"capital"}, {name:"continent"} ], sortFieldNum: 0, // sort by countryCode dataPageSize: 50, // autoFetchData: true, selectionType: "single" })
Comment