SmartClient Version: SNAPSHOT_v12.1d_2019-03-27/AllModules Development Only (built 2019-03-27)
and
SmartClient Version: v11.1p_2019-03-27/AllModules Development Only (built 2019-03-27)
Hello, I've just noticed that ListGrid.refreshData doesn't trigger dataChanged, you may try this modified sample (id=gridComponents):
If you press 'refresh data' you'll see that 'dataChanged' isn't logged.
Is it by design? Reading the dataChanged docs it seems that it would be called even in this case.
and
SmartClient Version: v11.1p_2019-03-27/AllModules Development Only (built 2019-03-27)
Hello, I've just noticed that ListGrid.refreshData doesn't trigger dataChanged, you may try this modified sample (id=gridComponents):
Code:
isc.ToolStrip.create({ ID: "gridEditControls", width: "100%", height:24, members: [ isc.Label.create({ padding:5, ID:"totalsLabel" }), isc.LayoutSpacer.create({ width:"*" }), isc.ToolStripButton.create({ title:"Refresh Data", click: "countryList.refreshData()" }) ] }); isc.ListGrid.create({ ID: "countryList", width:500, height:425, alternateRecordStyles:true, dataSource: countryDS, fields:[ {name:"countryCode", title:"Code", width:50}, {name:"countryName", title:"Country"}, {name:"capital", title:"Capital"}, {name:"continent", title:"Continent"} ], autoFetchData: true, showFilterEditor: true, canEdit:true, editEvent:"none", gridComponents:["header", "filterEditor", "body", gridEditControls], dataChanged : function () { isc.logEcho('dataChanged') this.Super("dataChanged", arguments); var totalRows = this.data.getLength(); if (totalRows > 0 && this.data.lengthIsKnown()) { totalsLabel.setContents(totalRows + " Records"); } else { totalsLabel.setContents(" "); } } })
Is it by design? Reading the dataChanged docs it seems that it would be called even in this case.
Comment