Dynamically updating valuesProvider in RadDataForm AutoCompleteInline not working


#1

Hi,
I need to dynamically update the valuesProvider in RadDataForm AutoCompleteInline. It does not work after selecting a value from PropertyEditor type=“Picker”, I can see my observable array data in my console after selecting a value from Picker, but it is not updating to the valuesProvider of AutoCompleteInline Editor.
What am I doing wrong? Been stuck with this issue for 3 days and I could not proceed further. Please help.


#3

Solved this issue by setting the valuesProvider value explicitly through the EntityProperty object of dataform
Sample code:
var viewModel = new Observable();
viewModel.items = new ObservableArray([]);
var mainViewModel = viewModel;

var dataform = page.getViewById(‘myDataForm’);
var productcodedataform = dataform.getPropertyByName(“productcode”);
productcodedataform.valuesProvider=mainViewModel[“productcodedata”];

Here mainViewModel is an instance of the Observable module.