Clear selection in dropdownfield

  1. #1

    Clear selection in dropdownfield

    How to clear the selection in a drop down field on the client? Like in the mobile device the little "x" beside the drop down to clear it.

    I have two drop down fields, one with checkboxes (multi select) and one without (single select), I found this post (http://forums.ext.net/showthread.php...rop-down-field) with the following code:

    <Click Handler="#{DropDownField}.component.cascade(function(item){if(item.isXType('checkbox')){item.setValue(false);}})" />
    But it didn't work, then I tried to use this example (https://examples2.ext.net/#/Form/Dro...alueText_Mode/) with the following code:

    <Click Handler="#{DropDownField}.component.getSelectionModel().deselectAll();" />
    But it didn't work too.
  2. #2
    Hello!

    Can you provide a sample to reproduce? Usually, component argument gives you internal component of the DropDownField. So to clear it's selection you should call appropriate to the inner control method.
  3. #3
    Hello

    Thanks for the reply, for the moment we have put everything in a formpanel and we use a reset button to clear them.
    If I find some time, I will create an example and post it, at the moment I haven't time to look for a better solution.

Similar Threads

  1. [CLOSED] ComboBox inside DropDownField causes it to collapse on item selection
    By Leonid_Veriga in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 13, 2014, 12:43 PM
  2. gridpanel clear selection is not working
    By tmducit in forum 2.x Help
    Replies: 2
    Last Post: Aug 27, 2012, 9:08 AM
  3. Clear selections in checkbox selection model
    By Birgit in forum 2.x Help
    Replies: 0
    Last Post: May 29, 2012, 12:28 PM
  4. Replies: 0
    Last Post: Apr 16, 2012, 6:12 PM
  5. [CLOSED] [1.0] Calendar and Clear Selection?
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 20, 2011, 12:06 PM

Tags for this Thread

Posting Permissions