0
votes

i have this case: i have product which have many warehouse, and a warehouse have many units

i have warehouse combobox and units combobox, when i change the value of warehouse combobox, the values in Units combobox changed (the same record).

here i make some sencha fiddle about it: https://fiddle.sencha.com/#view/editor&fiddle/1o08

when i edit a warehouse combobox the listener read all the record on the grid & change another combobox value in different record.

what i want is when i change warehouse in record 1 then only units combobox in record 1 that changed. i'm using ExtJS 5.0.1.

Any help would be appreciated, Thanks.

1

1 Answers

0
votes

Your itemupdate listener is calling widget.setStoreManually for all the comoboxes. We have to call it only for the corresponding combobox. We will only it when the recordId of the widget & the updated records matches.

Your itemupdate listener will look like:

itemupdate: function(rec,idx) {
            if(widget.getWidgetRecord().id==rec.id) // only when both id matches
               widget.setStoreManually(widget, rec)
}