Page 1 of 1
[VUE 2]
Posted: Tue Sep 13, 2022 8:39 am
by thejas.pateel
We are using dropdown and we want to use dynamic data in it. Such as initially the dropdown data will be blank and it should be disabled and after selecting a condition, api is being called and we are getting the data for the dropdown but we are not able to reflect it in the dropdown field.
For Example.
let say we have 3 dropdowns in a grid view i.e. Country, State and City as 3 different columns
After selecting the Country, API call should happen and the data of State should be populated and followed same as with City column
Re: [VUE 2]
Posted: Tue Sep 13, 2022 1:13 pm
by tasnim
Hi,
You can use https://bryntum.com/docs/grid/api/Grid/feature/CellEdit#event-beforeCellEditStart event.
beforeCellEditStart
event has access to the record, In that event handler you can check what field is currently editing and load data to editor's combo.
Combo should have ajax store.
Here is an example of how you can load data from store https://bryntum.com/docs/grid/api/Core/widget/Combo#snippet-loading-data-from-store
AjaxStore https://bryntum.com/docs/grid/api/Core/widget/Combo#snippet-loading-data-from-store
And here is an example of how you can load remote data to cell editor combo https://bryntum.com/docs/grid/api/Grid/feature/CellEdit#loading-remote-data-into-a-combo-box-cell-editor
Good Luck ,
Tasnim
Re: [VUE 2]
Posted: Wed Sep 14, 2022 12:50 pm
by thejas.pateel
Hi Tasnim,
Thank you for the approach.The method works .
Regards Thejas
Re: [VUE 2]
Posted: Wed Sep 14, 2022 1:04 pm
by tasnim
Glad to hear that, All the best