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.
Unfortunately, activation email could not send to your email. Please try again.

ListView Mobile Selected items

Thread ID:

Created:

Updated:

Platform:

Replies:

130054 Apr 18,2017 11:58 PM Aug 13,2018 06:26 AM ASP.NET MVC 3
loading
Tags: ListView
jaime
Asked On April 18, 2017 11:58 PM

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

Selvamani Sankarappan [Syncfusion]
Replied On April 20, 2017 05:09 AM

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. 


Emil
Replied On August 10, 2018 12:47 PM

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

Balaji M [Syncfusion]
Replied On August 13, 2018 06:26 AM

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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;