问题
I have a problem with combobox initial value. I'm using form.loadRecord() and form.updateRecord() to load form values and insert them to grid. It works ok except for the combo values. I load store for combo on demand when it is clicked, so after the initial loadRecord() I get an int value with id. I have both smthid and smthname columns on grid.
I tried to change the value beforerender but as suspected it gets propagated to grid. I need to somehow change the initial value of the combo without writing it to the grid when the value is not int.
回答1:
Try using setValue() or setRawValue() on the Combo. This should set the display, but not save the record until you updateRecord() manually.
来源:https://stackoverflow.com/questions/7805164/extjs-combo-initial-value-after-loadrecord-before-loading-store