-
25 Nov 2011 2:47 AM #1
Combobox in columnmodel in editorGridpanel
Combobox in columnmodel in editorGridpanel
I have a editorGridPanel with a combobox on a colomn. everything works but only after a other cell is clicked. is there a way to force the cell to process the data.
this is the code for the combo box
Code:var successCombo = new Ext.form.ComboBox({ xtype: 'combo', triggerAction: 'all', store: comboSuccessDS, iconCls: 'no-icon', valueField: 'perc', displayField: 'success_factor', tpl:'<tpl for="."><div ext:qtip="{perc} %. {subject}"; class="x-combo-list-item">{success_factor}</div></tpl>', allowblank: false, resizable: true, editable: false, grow: true, listeners: { expand : function(box){ box.setWidth(200); }, collapse : function(box){ //here i want to force the cell to process the new value } } });
-
25 Nov 2011 8:52 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
You are using it as an Editor? Not hard to do..
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
28 Nov 2011 12:43 AM #3
You're not really helping. The value only gets saved if an other cell is clicked. what can I do?
-
28 Nov 2011 4:01 AM #4
basically, in your usecase the changes will get applied on the blur event -> when the active editor loses focus.
it is also possible for fields to save on the keypress of enter / return, but not in your usecase since you set editable to false.
so, for an easy solution, i would allow editing and set the following 2 configs:
Code:forceSelection: true, typeAhead: true
-
28 Nov 2011 4:49 AM #5
I did what you suggested but I see no change in behaviour.
-
28 Nov 2011 5:41 AM #6
after a frustrated day i finaly got the anwser.
I tryed it before but apparently forgot to declare what should do a fireEvent();Code:collapse : function(box){ box.setWidth(60); box.fireEvent('blur'); }
tnks for the help everyone


Reply With Quote