I have a data grid with a column using the foreign key support.
This works great.
<e-column :field="ColumnFields.Commodity" headerText="Commodity" type="string" width="150"
foreignKeyValue="description" foreignKeyField="pickerOptionId" :dataSource="[]" />
And then I set the datasource:
column.edit.params.dataSource = list;
I can successfully edit the column. I'm using batch update and when clicking update it calls my
beforeBatchSave method:
:beforeBatchSave="beforeBatchSave"
This is the method that does the actual save to the back end (beforeBatchSave). And the value is changed when the changes reach this method.
When this method returns the call reverts back to the value it had before the update button was clicked (in the toolbar).
So my original data list (the datasource) does not get the updated value.
According to this link, in order to get the behaviour I want I need to set the datasource in the created event. That is challenging as I don't have the data there. It is loaded asynchronously - so I can only set it in a callback kicked off from that method - and this doesn't work. In fact I'm struggling to get any data to appear in the grid at all while using this mechanism for setting the data.