browser : all, OS: Windows 10.0, SC Version 13.0 8/29/2022
Desccription: after a fetchData on a Grid, a grid.setShowFilterEditor(false) and a grid.setShowFilterEditor(true) will result in a fetchData.
In my production application a programmatic grid.fetchData() afterwards then will not do a fetch. In the demo that I added only the dataFetch effect can be seen.
Demo:
open : SmartClient™ v13.0p_2022-08-30 Showcase
open console
replace code with this code:
// demo code
Desccription: after a fetchData on a Grid, a grid.setShowFilterEditor(false) and a grid.setShowFilterEditor(true) will result in a fetchData.
In my production application a programmatic grid.fetchData() afterwards then will not do a fetch. In the demo that I added only the dataFetch effect can be seen.
Demo:
open : SmartClient™ v13.0p_2022-08-30 Showcase
open console
replace code with this code:
// demo code
Code:
isc.ListGrid.create({ ID: "countryList", width:500, height:224, alternateRecordStyles:true, dataSource: worldDS, fetchData: function (criteria, callback, requestProperties) { isc.logEcho("caller:" + arguments.callee.caller.name + "->willFetch:" + this.willFetchData (criteria)); this.Super('fetchData', arguments); }, // display a subset of fields from the datasource fields:[ {name:"countryCode"}, {name:"countryName"}, {name:"capital"}, {name:"continent"} ], sortField: 1, // sort by countryName dataPageSize: 50, drawAheadRatio: 4 }) isc.IButton.create({ ID: "fetchUS", width:140, title:"Fetch Code: US", click:"countryList.fetchData({countryCode:'US'})" }) isc.IButton.create({ ID: "fetchEurope", autoFit:true, minWidth:140, title:"Fetch Continent: Europe", click:"countryList.fetchData({continent:'Europe'})" }) isc.IButton.create({ ID: "fetchAll", width:140, title:"Fetch All", click:"countryList.fetchData()" }) isc.IButton.create({ ID: "showFilter", width:150, title:"showFilterEditor", click:"countryList.setShowFilterEditor(true)" }) isc.IButton.create({ ID: "hideFilter", left:680, top:240, width:150, title:"hideFilterEditor", click:"countryList.setShowFilterEditor(false)" }) isc.HStack.create({ top: 240, width: "100%", membersMargin: 20, members: [fetchUS, fetchEurope, fetchAll, showFilter, hideFilter] });
Comment