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,501
    Vote Rating
    47
    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,501
    Vote Rating
    47
    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

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

      0  

    Default


    You have to use lazyRender:false in this case otherwise it only renders the list on focus by adding its own 'focus' listener.

    By using the listeners config, you get the first focus listener in, and so find it with no list rendered!

  8. #8
    Ext User
    Join Date
    Jan 2008
    Posts
    3
    Vote Rating
    0
    chrono is on a distinguished road

      0  

    Default


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

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

      0  

    Talking


    @Animal: Thx, but i couldnt get it work with lazyRender:false, still needed a delay...

    Thx Cronos ... just as i found a solution...
    Code:
    				listeners: { 
     				    focus :{scope:this, fn:function(field) {
    						      field.onTriggerClick();
     				    	},buffer:200} 	
    				   }
    ... i saw your code and it also works like a charm.
    Thx a lot you 2

  10. #10
    Sencha User
    Join Date
    Jul 2012
    Posts
    8
    Vote Rating
    0
    siddmuk2005 is on a distinguished road

      0  

    Default Thank it helps.

    Thank it helps.


    combo box automatically expanded after applying your code on Ext.onReady()

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi