Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    139
    Vote Rating
    1
    Spirit is on a distinguished road

      0  

    Default [solved]automatic expand combobox in grid

    [solved]automatic expand combobox in grid


    I know this has been discussed a few times but i found no contribution where it works.

    I tried 2 approaches:

    First i tried to add an listener to my grid:
    Code:
    		listeners: { 
    		   	celldblclick: function(o, row, cell, e) {
    		      	o.getColumnModel().getCellEditor( cell, row).field.expand();
    	     },
    The editor is a Ext.form.ComboBox, so i thought this should work but it does not.

    My second approach:
    I added an listener to my editor (Ext.form.ComboBox), so i could expand my combobox when it gets focus. Again there is no problem of catching the desired event but if i try to expand
    the combobox i get the following error:
    >>this.list has no properties

    I dunno why i get this error. The store of my combobox is autoloaded, so i m pretty sure the list should exist. I tried playin around with mode, lazyRender and loaded the store explicitly but noting helps.

    [CODE]
    var storestatusrg = new Ext.data.JsonStore({
    url: 'rgcbs.php',
    baseParams:{typ:'status',langid:1},
    root: 'items',
    fields: ['id', 'name'],
    autoLoad:true
    })


    cbtyprg = new Ext.form.ComboBox({
    storetoretyprg,
    triggerAction: 'all',
    emptyText:'Bitte w

  2. #2
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    139
    Vote Rating
    1
    Spirit is on a distinguished road

      0  

    Default ok...

    ok...


    ...i know everyone is reading the licensing threat so nobody has time... but ... can someone point me in the right direction.

    bump!

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Configure your combobox with a focus listener which calls onTriggerClick

  4. #4
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    139
    Vote Rating
    1
    Spirit is on a distinguished road

      0  

    Default


    Thats what i did in the second example above. And i get an error:
    this.list has no properties

    See above :/

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    You need to set scope.

    What do you think "this" is going to be inside that function?

  6. #6
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    139
    Vote Rating
    1
    Spirit is on a distinguished road

      0  

    Default


    Hmmm... has nothing to do with scope this time... or i am i totally wrong ?

    [CODE]
    cbtyprg = new Ext.form.ComboBox({
    storetoretyprg,
    triggerAction: 'all',
    emptyText:'Bitte w