We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to clear the selected checkboxes inside the dropdownlist control

Hi Support:

We want to have a button that when is clicked will reset the selected checkboxes inside the dropdownlist asp.net core control.

This is the dropdownlist definition:

<ej-drop-down-list id="states" name="states" show-checkbox="true" datasource="@((IEnumerable<State>)ViewData["States"])">
                                    <e-drop-down-list-fields text="Name" value="ID"   />
                                    
                                </ej-drop-down-list>

Thanks in advanced

David

1 Reply

KV Karthikeyan Viswanathan Syncfusion Team March 22, 2017 11:16 AM UTC

Hi David,   
  
Thanks for Contacting Syncfusion support.   
  
You can unselect the selected items by using unCheckAll() public method in Dropdown List. Please refer to the below code snippet:   
<code>   
  
function btnclick(args) {   
            target = $('#skillsets').data("ejDropDownList");   
               target.unCheckAll();   
        }   
  
</code>   


 
 
Refer to the online sample browser sample linkhttp://aspnetcore.syncfusion.com/dropdownlist/checkbox    
  
  
Regards,   
Karthikeyan V.  


Loader.
Up arrow icon