1.

When I Add Or Modify An Item In My Dataprovider, Why Does Not It Show Up In My Datagrid?

Answer»

Low-level methods like Array.push() or myArray[0] = "whatever" do not cause the DATAPROVIDER's modelChanged event to fire.

When you WORK with a dataProvider, it is always best to use the dataProvider API. In the above EXAMPLE, you might code: myDataProvider.addItem(myItemObject) to add an item or use editField() to modify a VALUE programmatically.

Alternatively, you can call myDataProvider.modelChanged yourself or reassign dataProvider to the CONTROL, as follows: myDataGrid.dataProvider = myDataProvider;

Low-level methods like Array.push() or myArray[0] = "whatever" do not cause the dataProvider's modelChanged event to fire.

When you work with a dataProvider, it is always best to use the dataProvider API. In the above example, you might code: myDataProvider.addItem(myItemObject) to add an item or use editField() to modify a value programmatically.

Alternatively, you can call myDataProvider.modelChanged yourself or reassign dataProvider to the control, as follows: myDataGrid.dataProvider = myDataProvider;



Discussion

No Comment Found