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

      0  

    Default Unanswered: EXT COMBO

    Unanswered: EXT COMBO


    Hai i am getting problem with ext combo box

    Problem : When i assigned same values for valueField,i am not able to select displayField

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,593
    Answers
    541
    Vote Rating
    324
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Which ExtJS version?

    From the description you've given it's impossible to help you. Please include some code and a full description of the problem you're having.

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

      0  

    Default EXT COMBO

    EXT COMBO


    Code:
    var fieldCombo = new Ext.form.ComboBox({
        id: 'fieldNameCombo,
        name: 'columnName',
        typeAhead: false,
        displayField:'GRPBYNAME',
        valueField:'GRPBYID',
        queryMode:'local',
        width:140,
        allowBlank: false,
        emptyText: 'Select search field',
        renderTo: 'fieldNameBox',
        store:{
            xtype:'Store',
            fields:[
                {
                   type:'string',
                   name:'GRPBYID'
                },
                {
                   type:'string',
                   name:'GRPBYNAME'
                }
            ],
            data:[
                {
                   'GRPBYID':'TEXT',
                   'GRPBYNAME':'Name'
                },
                {
                   'GRPBYID':'TEXT',
                   'GRPBYNAME':'Address'
                },
                {
                   'GRPBYID':'DATE',
                   'GRPBYNAME':'Date'
                },
                {
                   'GRPBYID':'NUMBER',
                   'GRPBYNAME':'Number'
                },
                {
                   'GRPBYID':'DATE',
                   'GRPBYNAME':'Time'
                }
            ]
        }
    });
    I have the above code,In that code i assigned GRPBYID as the value field. The data which comes from server has same GRPBYID value for different display names.The problem is that when i try to select different display name with same value combo box is not selecting the new display field.

    Please suggest if there is any mistake in the code.
    Last edited by skirtle; 30 Nov 2011 at 4:30 AM. Reason: Added CODE tags

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,593
    Answers
    541
    Vote Rating
    324
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    You can't have the value in your valueField repeated across multiple records. It has to be unique within that store.

Thread Participants: 1