Results 1 to 4 of 4

Thread: EXT COMBO

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
      0  

    Default 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,790
    Answers
    583
    Vote Rating
    391
      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
      0  

    Default 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,790
    Answers
    583
    Vote Rating
    391
      0  

    Default

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

Posting Permissions

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