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

Clear selection after refresh control

Hi,

I have a dropdownlist control and I am preselecting some items, in fact all items of the dropdownlist are selected. I needed to code this:
$("#contactosCrear").on("shown.bs.modal", function (e) {
        $("#Roles").ejListBox("refresh", true);
    });
in order to get the vertical scroll bar, but after refreshing, just one item keeps selected.
I am sending images of debugging to ilustrate the behavior i am describing.

I need your supponrt to solve this, 

Kind regards,

Juan J.

Attachment: EjListBox_39a64395.zip

1 Reply

AB Ashokkumar Balasubramanian Syncfusion Team August 26, 2019 11:19 AM UTC

Hi Juan Jose Uribe, 
 
Good day to you. 
 
We have checked your reported query to selected items of list box is not maintained after refresh. We are not able to reproduce your issue from our end. We have prepared a sample for your reference.  
 
In that sample, we have given the alert message for selected items of list box. Refer the code snippet below. 
 
  $('#myModal').on('shown.bs.modal', function (e) {  
              // Event triggered after opened bootstrap modal  
              var selectedItems = $("#listbox").data("ejListBox"); 
              alert(selectedItems.model.selectedItems); // selected items before the refresh method 
             $("#listbox").ejListBox("refresh", true);  // Refresh the listbox  
              alert(selectedItems.model.selectedItems); // selected items after the refresh method 
      }); 
 
 
If we misunderstand your reported query, can you please replicate the issue in attached sample or else share a simple sample or video to replicate your issue. This will helpful for us to reproduce your issue and resolve the issue as soon as possible. 
 
Regards, 
Ashokkumar B. 


Loader.
Live Chat Icon For mobile
Up arrow icon