1. #1
    Sencha User
    Join Date
    Aug 2008
    Posts
    111
    Vote Rating
    0
    Rothariger is on a distinguished road

      0  

    Default Disable ComboBox Item...?

    Hello,

    i have this strange requirement, i must to disable a item of the ComboBox if the item was already selected... is there any way of accomplish this?


    thanks!

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    84
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default

    selecting the item twice should cause no harm as long as you don't have custom event listeners for the select event.

    That said, you could probably achieve a custom class for that selected item by a custom template.

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    111
    Vote Rating
    0
    Rothariger is on a distinguished road

      0  

    Default

    ok, thanks i will look in that direction.

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    108
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default

    I would return false in the beforeselect event if the selected value is the same as the current value.

Thread Participants: 2