Hi there,
We have a ListGrid with a ListGridField. In this ListGridField we are using a (remote) Datasource.
If the user is executing a special event, we want to replace the current Datasource in the ListGridField.
Normally I would assume I can use invalidateCache, but this doesn't has any affect on the shown selectOptions of the Selectbox in the ListGridField
I've tested this issue against the latest release of Smartclient 10.1 (SmartClient_v101p_2016-05-13_Pro) and this does happen in all current browsers.
We are facing this issue with a remote datasource, but it's also reproducable with a local datasource
In the example below, an additional item is added after the button click. But despite calling invalidateCache() the data are still there.
In the log you can see that after the button-click the size of the datasource has changed.
Code for reproduction
Best Regards
We have a ListGrid with a ListGridField. In this ListGridField we are using a (remote) Datasource.
If the user is executing a special event, we want to replace the current Datasource in the ListGridField.
Normally I would assume I can use invalidateCache, but this doesn't has any affect on the shown selectOptions of the Selectbox in the ListGridField
I've tested this issue against the latest release of Smartclient 10.1 (SmartClient_v101p_2016-05-13_Pro) and this does happen in all current browsers.
We are facing this issue with a remote datasource, but it's also reproducable with a local datasource
In the example below, an additional item is added after the button click. But despite calling invalidateCache() the data are still there.
In the log you can see that after the button-click the size of the datasource has changed.
Code for reproduction
Code:
countryData = [{"countryName" : "Kroatien" }, {"countryName" : "Kuba" }, {"countryName" : "Lesotho" }, {"countryName" : "Lettland" }, {"countryName" : "Litauen" }, {"countryName" : "Malawi" }, {"countryName" : "Malediven" }, {"countryName" : "Marokko" }, {"countryName" : "USA" } ]; function addNewCountries() { countryData.push({ "countryName" : ("" + countryData.size()) }); var dataSource = listGrid.getField(listGrid.getFieldNum("countryName")).editorProperties.optionDataSource; listGrid.endEditing(); dataSource.setCacheData(countryData); dataSource.invalidateCache(); dataSource.fetchData() }; isc.VLayout.create({ "ID" : "layout", "autoDraw" : true, "members" : [isc.Button.create({ "ID" : "button", "action" : function () { addNewCountries() }, "overflow" : "visible", "title" : "Add new countries" }), isc.ListGrid.create({ "ID" : "listGrid", canEdit : true, "fields" : [{ "name" : "countryName", "title" : "Country", "editorType" : "ComboBoxItem", "editorProperties" : { "ID" : "listGridField_33Editor", "displayField" : "countryName", optionDataSource : isc.DataSource.create({ dataFormat : "json", ID : "countryDS", clientOnly : true, testData : countryData }), "textMatchStyle" : "substring", "loadingDisplayValue" : null } } ], "members" : [], "data" : [{ "countryName" : "None" } ] })] })
Comment