1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    10
    Vote Rating
    0
    Fonnit is on a distinguished road

      0  

    Default Answered: combobox in grid

    Answered: combobox in grid


    Hi all,
    I have a combobox that has two values in my grid using Extjs 4.

      valuefield / displayfield
     1 / ""
     2 / ○

    I can not select in my grid because there is no value displayed in the list...
    Please help me...

  2. Try setting the display value of your first item to '\u00a0' instead of an empty string.

  3. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,331
    Vote Rating
    77
    Answers
    124
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi fonit,

    I'm not sure what are you trying to do here, if you have empty displayField then you can't select that item.
    See the sample combobox example -
    http://jsfiddle.net/maneeshgo/cEbTK/
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  4. #3
    Sencha User
    Join Date
    May 2012
    Posts
    10
    Vote Rating
    0
    Fonnit is on a distinguished road

      0  

    Default


    Hi sword-it,
    thanks for your example.

    i want to select the value that is empty in the combobox.....

    my questions :
    1)why empty displayField can not be selected ?
    2)the empty displayField item's height is too short. how do i change the height of that item?
    02.png

  5. #4
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    871
    Vote Rating
    22
    Answers
    98
    friend will become famous soon enough friend will become famous soon enough

      0  

    Default


    As an alternative, consider using the emptyText property on your combobox config. If no selection is made, the combo's value will remain empty/null.

  6. #5
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    253
    Vote Rating
    17
    Answers
    39
    droessner will become famous soon enough droessner will become famous soon enough

      0  

    Default


    Try setting the display value of your first item to '\u00a0' instead of an empty string.