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

ListView Mobile Selected items

Hi, I have a doubt, how can I know which selected items are in a listview mobile, thanks for your time and support



Attachment: codelistview_b163a003.rar

3 Replies

SS Selvamani Sankarappan Syncfusion Team April 20, 2017 09:09 AM UTC

Hi Jaime, 
 
Thanks for using Syncfusion products. 
 
You can get the selected items using our existing property checkedIndices. Refer to the following code example: 
 
[script] 
function getItem(args) { 
 
            var lobj = $('#remotelistbox').ejmListView("instance"); // lobj refers to the listview of the object 
            alert("" + lobj.model.checkedIndices); 
        } 
 
Refer to the following sample: 
 
 
Please let us know if you need any further assistance. 
 
Regards, 
 
Selvamani S. 



EM Emil August 10, 2018 04:47 PM UTC

how can we achieve that without using a button? just select an iteam in the list and navigate to another action in the controller like details action


BM Balaji M Syncfusion Team August 13, 2018 10:26 AM UTC

Hi Jaime,  
 
We suggest you bind the select event in ListView component to retrieve the selected item details from it.  
 
Code Snippet:  
<ul data-role="ejmlistview" id="remotelistbox" data-ej-datasource="window.datasource" data-ej-fields-text="ShipCity" data-ej-fields-value="ShipCity" data-ej-enablechecklist="true" data-ej-itemscount="7"  data-ej-select="select"> 
</ul> 
 
function select(args) { 
            alert(args.text) 
 } 
 
Let me know if you have any queries. 
 
Regards, 
M. Balaji 


Loader.
Live Chat Icon For mobile
Up arrow icon