I have an invalidateCache/fetch logic that only works if the listgrid does not have grouping. If you run the testcase below using sample data in /isomorphic/system/reference/SmartClient_Explorer.html#dynamicGrouping, click on "test invalidate". You'll notice that the data is not fetched. I see this code working when one of two things is removed:
1. if I remove groupByField: "continent"
OR 2. if I remove isA.Tree(countryList.data) check
What's wrong here? Am I not allowed to call this function for grouped data?
1. if I remove groupByField: "continent"
OR 2. if I remove isA.Tree(countryList.data) check
What's wrong here? Am I not allowed to call this function for grouped data?
Code:
isc.ListGrid.create({ ID: "countryList", width:522, height:224, alternateRecordStyles:true, cellHeight:22, dataSource: countryDS,groupByField: "continent", // display a subset of fields from the datasource fields:[ {name:"countryName"}, {name:"government"}, {name:"continent"}, {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false} ], groupStartOpen:"all" }) isc.Button.create({ title:"test invalidate", left: 700, click:function(){ if(countryList.data && isA.ResultSet(countryList.data) || isA.Tree(countryList.data)){ countryList.invalidateCache(); }else{ countryList.fetchData(); } } });
Comment