javascript - Dynamically setting multiSelect for combobox in extJS -
i kinda facing interesting problem combobox's multiselect property.
i have grid 3 columns id, name, associated part.
i have enabled rowediting plugin , editors id textfield(editid), name textfield(editname) , associated part combobox(editpartcombo multiselect true).
i have 2 buttons add , update.
when select row in grid , press update, rowediting starts @ exact position. in update button code, setting multiselect property of editpartcombo false somehow not reflecting.
code on update button:
{ text: 'update press', handler: function(btn){ var grid = btn.up('grid'); var selection = grid.getselectionmodel().getselection(); if(selection.length > 0){ combo = ext.getcmp('editpartcombo'); combo.multiselect = false; delete combo.picker; combo.createpicker(); combo.reset(); var rowediting = grid.getplugin('roweditplugin'); var rowno = grid.store.indexof(selection[0]); rowediting.canceledit(); rowediting.startedit(rowno, 1); } else{ ext.msg.alert('error' , 'please select row update'); } }
in firebug when inspect combo - shows multiselect false still able select multiple values.
not sure doing wrong?
please help.
thanks in advance.
if cange config value after component created, not guaranteed value applied. config option, , other doesn't work.
i recommend ext.create
combobox, , inject multiselect configuration @ time. 1 button create multiselect
enabled, , disabled other.
Comments
Post a Comment