When invalideCache is called on a grouped ListGrid, it loses its current filter criteria and grouping.
I have created sample to show the problem using the adaptive filter example. Just replace the sample code at
http://www.smartclient.com/docs/7.0rc2/a/system/reference/SmartClient_Explorer.html#adaptiveFilter
with the code below:
CASE 1 - Behaves as expected
When you run the example above, you will see a listgrid filtered programmatically. Push the "Invalidate cache" button and it will bring the same set of records.
CASE 2 - Possible bug
Uncomment the groupBy line at the end of the sample and run again. You will see a small set of records grouped by category. Push the Invalidate button and it will lose both grouping and current filter criteria. You will see many more records showing up. It is expected to bring the same records without removing grouping.
As you see from the link above, the bug exists in SmartClient 7.0 RC2. I have tested the behavior in Chrome, FireFox, and IE 8.
I would be glad if you could suggest a workaround.
Thanks in advance.
I have created sample to show the problem using the adaptive filter example. Just replace the sample code at
http://www.smartclient.com/docs/7.0rc2/a/system/reference/SmartClient_Explorer.html#adaptiveFilter
with the code below:
Code:
isc.ListGrid.create({ ID: "supplyList", width:500, height:300, alternateRecordStyles:true, dataSource: supplyItem, fields:[ {name:"SKU"}, {name:"description"}, {name:"category"} ], autoFetchData: false, autoDraw: false }); isc.VLayout.create({ members: [isc.Button.create({ title: "Invalidate cache", autoFit: true, click:"supplyList.invalidateCache()" }), supplyList ] }); //supplyList.groupBy("category"); supplyList.filterData({itemName:"adding"});
When you run the example above, you will see a listgrid filtered programmatically. Push the "Invalidate cache" button and it will bring the same set of records.
CASE 2 - Possible bug
Uncomment the groupBy line at the end of the sample and run again. You will see a small set of records grouped by category. Push the Invalidate button and it will lose both grouping and current filter criteria. You will see many more records showing up. It is expected to bring the same records without removing grouping.
As you see from the link above, the bug exists in SmartClient 7.0 RC2. I have tested the behavior in Chrome, FireFox, and IE 8.
I would be glad if you could suggest a workaround.
Thanks in advance.
Comment