1. #1
    Ext GWT Premium Member
    Join Date
    Jan 2012
    Posts
    1
    Vote Rating
    0
    stmurphy65 is on a distinguished road

      0  

    Question Answered: Is it possible to disable specific items in a DualListField?

    Answered: Is it possible to disable specific items in a DualListField?


    Given a DualListField, is it possible to disable specific items? I need to show all the items in the list but prevent specific items from being selected, and they would be grayed out as well.
    Last edited by stmurphy65; 3 Oct 2012 at 5:38 AM. Reason: Removed sentence

  2. DualListField simply wraps a ListView. If I understand you correctly, you want to "disable" an item in the list, correct?

    If so, the only way to do this would be to modify the appearance to "read" a property (or something) on list item in question and cause it to be rendered differently.

    If you simply want to prevent the user from selecting it, you can add a select handler to the ListView's SelectionModel and undo the selection immediately which will have the same effect. Or, you can create your own SelectionModel and have it ignore clicks on specific items all together.

  3. #2
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Vote Rating
    21
    Answers
    20
    icfantv will become famous soon enough icfantv will become famous soon enough

      1  

    Default


    DualListField simply wraps a ListView. If I understand you correctly, you want to "disable" an item in the list, correct?

    If so, the only way to do this would be to modify the appearance to "read" a property (or something) on list item in question and cause it to be rendered differently.

    If you simply want to prevent the user from selecting it, you can add a select handler to the ListView's SelectionModel and undo the selection immediately which will have the same effect. Or, you can create your own SelectionModel and have it ignore clicks on specific items all together.

Thread Participants: 1

Tags for this Thread