1. #1
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    2
    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,333
    Answers
    124
    Vote Rating
    85
    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 Premium Member
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    2
    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
    895
    Answers
    106
    Vote Rating
    27
    friend has a spectacular aura about friend has a spectacular aura about

      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
    311
    Answers
    59
    Vote Rating
    52
    droessner is a jewel in the rough droessner is a jewel in the rough droessner is a jewel in the rough

      0  

    Default


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