AddItem and RemoveItemByText is not working

        var text = $(this).val();
        $('#avaiable').ejListBox("removeSelectedItems");
        $('#selected').ejListBox("addItem",text);

I use these method in my listboxes and there is no result on screen and in structure HTML. What methods should I use to enable adding and removing items?

4 Replies

SS Selvamani Sankarappan Syncfusion Team March 12, 2018 08:57 AM UTC

Hi Maciej,   
   
Thanks for contacting Syncfusion support.   
   
We were unable to reproduce the reported issue at our end. You can use the addItem method to add the items into the ListBox at dynamically. Also, remove the list items from the ListBox by using the following methods:   
removeSelectedItems: This method removes all the selected items in ListBox.   
removeItemByIndex: This method removes item by passing the index value.   
removeItemByText: This method removes item by passing the index value.   
   
We have prepared the sample based on your code example. Please refer it:   
   
To know more about ListBox control properties, methods and events, refer to the following API link:   
   
If still you face any difficulties, kindly let us know. We will be happy to help you.   
   
Regards,   
   
Selvamani S.   



RO Roman August 23, 2020 09:42 AM UTC

Hi Selvamani 
The issue is still there. Steps to reproduce:
1. Add `sortOrder:"ascending"` to the list box options
2. Click on AddItem button
3. Select "CBR 150-R" item
4. Click on Remove button
5. Observe: "CBR 150-R" is still there but "CBZ Xtreme" is removed

I'm very frustrated:


MK Muthukrishnan Kandasamy Syncfusion Team August 24, 2020 06:28 AM UTC

 
Hi Roman, 
 
Sorry for the inconvenience. 
 
We have validated and confirmed your reported problem as defect in ListBox control. We will include the fix for this issue in our upcoming Volume 3 release of 2020, which is expected to be rolled out in late September 2020. 
 
You can track the status of this issue fix through the below feedback portal link. 
 
 
We appreciate your patience. 
 
Regards, 
Muthukrishnan K 



MK Muthukrishnan Kandasamy Syncfusion Team October 5, 2020 05:06 AM UTC

 
Hi Roman, 
 
We are glad to announce that our Essential Studio 2020 Volume 3 release v18.3.0.35  is rolled out and is available for download under the following link. 
 
 
As mentioned in our previous update, we have implemented and included the fix for the “RemoveSelectedItems method not working as expected” with this release (v18.3.0.35). Please refer to the below portal link. 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Muthukrishnan K 


Loader.
Up arrow icon