1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    7
    Vote Rating
    0
    dragem is on a distinguished road

      0  

    Question 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
            }
        }
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,226
    Vote Rating
    859
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You are using it as an Editor? Not hard to do..
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    7
    Vote Rating
    0
    dragem is on a distinguished road

      0  

    Default


    You're not really helping. The value only gets saved if an other cell is clicked. what can I do?

  4. #4
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,681
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    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
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    7
    Vote Rating
    0
    dragem is on a distinguished road

      0  

    Default


    I did what you suggested but I see no change in behaviour.

  6. #6
    Sencha User
    Join Date
    Nov 2011
    Posts
    7
    Vote Rating
    0
    dragem is on a distinguished road

      0  

    Default


    after a frustrated day i finaly got the anwser.

    Code:
    collapse : function(box){
    	box.setWidth(60);
    	box.fireEvent('blur');
    }
    I tryed it before but apparently forgot to declare what should do a fireEvent();

    tnks for the help everyone