Results 1 to 3 of 3

Thread: How to disable ComboBox item?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default Unanswered: How to disable ComboBox item?

    Hi,

    How can one disable a ComboBox item so that it is not selectable?

    Thanks.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Answers
    109
    Vote Rating
    93
      0  

    Default

    As a matter of UI you have to ask yourself first: Why show the user something they can never do? Should it even be in the list?

    As a matter of preventing selection: Listen to the BeforeSelect event, and cancel it. This should stop the user from being able to clock on it to select it.

    As a matter of styling: Draw this item differently than the others using a template - perhaps make the text gray, perhaps give it a different background, perhaps make it slightly transparent.

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default

    Thanks for the reply.

    Why the need for such feature?
    To show to the user that the option is available but that it has been used up.

    There should be native support for this as want to also gray-out the icon for the item.
    As this is well supported by the HTML select box and widely used, I am surprised that it is not a default feature.

    Can someone please post an example of a solution?

Posting Permissions

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