Results 1 to 3 of 3

Thread: Disable a combobox item?

  1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    22

    Default Disable a combobox item?

    Is there a built-in way for a combobox item to be disabled so that it still shows but clicking on it does nothing?

    Thanks in advance...

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    There is not a built-in way to disable an item in the combobox directly. You can evaluate the record with a listener on the beforeselect event and return false to prevent it from being selected.
    http://docs.sencha.com/extjs/4.2.0/#...t-beforeselect

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Location
    India
    Posts
    50
    Answers
    4

    Default

    Another way is to make the combo disabled true and set the disabledCls with opacity 1. Try with the below code.
    Code:
    set disabled : true,
    disabledCls : 'opacity-full',
    
    cls class -
    .opacity-full{
    opacity = 1;
    }

Tags for this Thread

Posting Permissions

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