Results 1 to 3 of 3

Thread: combo and IE8

  1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    264

    Default combo and IE8

    Hello !

    I have build a grid. In the 'tbar' of the grid there is a combobox.
    When i test the grid in the FF3.3.x or in the Chrome browser it works fine.
    When i test in the IE8 the combo works not correct.

    See image.

    Here is the code from the grid.

    Code:
    grid = new Ext.grid.GridPanel({
                autoHeight: true,
                stripeRows: true,
                loadMask: true,
                columnLines: true,
                autoExpandColumn: 'progname',
                store: gridStore,
                width: 900,
                id: 'myGrid',
                title: 'vorhandene Programme',
                columns: [
                        new Ext.grid.RowNumberer({width: 30})
                          ,{
                            xtype: 'numbercolumn',
                            dataIndex: 'Fa_Id',
                            header: 'Programm ID',
                            sortable: true,
                            width: 100,
                            format: '0',
                            id: 'Fa_Id'
                        },{
                            xtype: 'gridcolumn',
                            header: 'Programmname',
                            sortable: true,
                            dataIndex: 'progname',
                            id: 'progname'
                        },{
                            xtype: 'gridcolumn',
                            header: 'Stadt',
                            sortable: true,
                            width: 150,
                            dataIndex: 'AO_City',
                            id: 'AO_City'
                         },{
                            xtype: 'gridcolumn',
                            header: 'Firma',
                            sortable: true,
                            width: 250,
                            dataIndex: 'company',
                            id: 'company'
                         },{
                            xtype: 'gridcolumn',
                            header: 'cityId',
                            hidden: true,
                            width: 50,
                            dataIndex: 'cityId',
                            id: 'cityId'
                         }],
                 bbar: [{
                        xtype: 'paging',
                        store: gridStore,
                        id: 'paging',
                        pageSize: 20,
                        displayMsg: "Anzeige: {0} - {1} von {2} ",
                        displayInfo: true
                 }],
                 tbar: [{
                        text: 'Programmbezeichnung oder Programmnummer:'
                    },{
                        xtype: 'textfield',
                        width: 150,
                        name: 'progSearch',
                        id: 'progSearch',
                        minLength: 3,
                        emptyText: 'min. 3 Zeichen'
                    },{
                        xtype: 'tbseparator'
                    },{
                        text: 'Stadt:'
                    },{
                        xtype: 'combo',
                        width: 150,
                        allowBlank: false,
                        id: 'city',
                        forceSelection: true,
                        triggerAction: 'all',
                        displayField: 'city',
                        valueField: 'id',
                        hiddenName: 'city',
                        store: cityStore,
                        lazyRender:true,
                        typeAhead: true
                    },{
                        xtype: 'tbseparator'
                    },{
                        text: 'Firma:'
                    },{
                        xtype: 'textfield',
                        width: 150,
                        name: 'companySearch',
                        id: 'companySearch',
                        emptyText: 'min. 3 Zeichen'
                    },{
                        xtype: 'tbseparator'
                    },{
                        xtype: 'button',
                        text: 'suche',
                        icon: '/buttons/arrow_right.png',
                        handler: function(){
                            var progSearch = Ext.getCmp('progSearch').getValue();
                            if(progSearch.length < 3){
                                showMsgBox('mindestens 3 Zeichen');
                                
                                return;
                            }
    
                            var city = Ext.getCmp('city').getValue();
                            if(!city){
                                showMsgBox('Bitte Stadt whlen');
                                
                                return;
                            }
                            
                            gridStore.setBaseParam('progsearch', progSearch);
                            gridStore.setBaseParam('city', city);
    
                            var companySearch = Ext.getCmp('companySearch').getValue();
                            if(companySearch.length > 3)
                                gridStore.setBaseParam('company', companySearch);
                            else{
                                gridStore.setBaseParam('company', '');
                                Ext.getCmp('companySearch').setValue('');
                            }
                                
                            gridStore.load();
                        }
                    },{
                        xtype: 'tbseparator'
                }],
                buttons: [{
                        text: 'deutsch',
                        handler: function(){
                            fillTemplate(1);
                        }
                    },{
                        text: 'englisch',
                        handler: function(){
                            fillTemplate(2);
                        }
                    },{
                        text: 'Sprachen'
                    },{
                        text: 'Termine'
                    },{
                        text: 'Preise'
                    }
                ]
            });
    Who can help ?

    Your sincerly

    Stephan
    Attached Images Attached Images

  2. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895

    Default

    When I comment out/remove id: 'city' on your Combobox, the code sample works as expected.

    I think it may somehow be conflicting with the cityStore, since one of your field names there is 'id'.

    The use of hard-coded ID attributes on components leads to very brittle code and is generally discouraged.

    Check out Jay's excellent screencast on this very topic: http://tdg-i.com/392/ext-js-screenca...-of-ext-getcmp

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Posts
    264

    Default IE8 and combo solved

    Hello ! Thanks for the tip. When i remove the id: 'city' it works. Your sincerly Stephan

Similar Threads

  1. Replies: 1
    Last Post: 25 Mar 2011, 3:12 AM
  2. [S] Remote Combo Combo doesn't accept any word that isn't in the list
    By Laufwerk in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 3 Jul 2009, 6:01 AM
  3. [solved] Combo box needs to be displayed as ordinary HTML combo box.
    By Prathima in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 29 Dec 2008, 11:05 PM
  4. Replies: 1
    Last Post: 20 May 2008, 4:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •