A problem with drop down list

I have a drop down list like the following:

{name:“cmbStatus”,
width:“300”,
title: “Choose:”,
optionDataSource: “StatusDS”,
editorType:“select”,
valueField:“ID_Status”,
displayField: “Description_Status”,
showAllOptions: true}

I’ve changed optionDataSource, but in drop down list were the old values. I don’t know how to refresh this drop down list when I change the optionDataSource? I’ve tried something with getPickListFilterCriteria, but it did not work. Could you help me with this?
Thanks in advance.

You can call selectItem.fetchData() at any time to force new options to be fetched. If that doesn’t help, please show your actual code.

I have Dynamic Form:

isc.DynamicForm.create({
encoding:“multipart”,
ID:“updateStatusForm”, margin:“25”,
cellPadding:5, autoDraw:false,
autoFocus:true,
fields:[{name:“cmbStatus”, width:“300”, title: “Choose status”,
optionDataSource: “StatusDS”,
editorType:“select”, valueField:“ID_Status”,
displayField: “Description_Status”,
showAllOptions: true },
{name: “btnUpdate”, colSpan:2, align:“right”,
editorType:“button”, title:“Update”,
click: function() {
if(!updateStatusForm.validate()) return;
UpdateStatus(_documentID, _versionNumber,
updateStatusForm.getValue(‘cmbStatus’));
updateStatusForm.clearValues();
}}]

 });

I am not sure how to call fetchData(). Could you tell me how to do that in my example?

updateStatusForm.getItem(“cmbStatus”).fetchData()

I’ve tried that but I got an error:

“Microsoft JScript runtime error: Object doesn’t support this property or method”

I’ve tried also with updateStatusForm.getField(“cmbStatus”).fetchData(), but I got the same error.

That’s strange
Which build are you using, Ivana?

Thanks
Isomorphic Software

I am using version 5.6 of SmartClient. I had some problems when I tried to migrate to 5.7 so I still use version 5.6.

Thanks,
Ivana

Hi Ivana,

We’d recommend moving to 6.0 to use this feature (and many others).

If you encounter problems while migrating to the new version, make sure your code follows the documentation and that you have looked at the available 6.0 patches in the Addendums forum. If you think you’ve found a bug in SmartClient, please post a test case.