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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable multi select on ListView with Checkbox

Thread ID:

Created:

Updated:

Platform:

Replies:

144266 Apr 27,2019 01:13 PM UTC May 31,2019 12:04 PM UTC ASP.NET Core - EJ 2 3
loading
Tags: ListView
Sanjay
Asked On April 27, 2019 01:13 PM UTC

Hi

       @{ 
        

            var addressListData = "<span>${AddressType}&nbsp-&nbsp${Line1}&nbsp${Line2}</span>";
        }
        <div class=" col-sm-6 col-md-6">
            <ejs-listview enable="true" id="addressBillingId" template="@addressListData" actionComplete="billingAddressSelected" showCheckBox="true">
            </ejs-listview>

        </div>

The list view with checkbox, is there a way to disable multi select?

Thanks
Sanjay

Ashokkumar Balasubramanian [Syncfusion]
Replied On April 29, 2019 12:55 PM UTC

Hi Sanjay, 
 
Greetings from Syncfusion. 
 
There is no native support for disable the multiple items selection in ListView component with checkbox is designed, but we were able to achieve this by using select event and checkItemuncheckAllItems method. Please check the below code block and sample. 
 
var listview = document.getElementById("list").ej2_instances[0];     
function onSelect(args) { 
        //unselect selected items
        listview.uncheckAllItems();
 
        //select the currently checked item
        listview.checkItem(args.item);
    }
 
 
 
Please let us know, if you need any further assistance on this. 
 
Regards, 
Ashokkumar B. 


Sanjay
Replied On May 30, 2019 10:48 AM UTC

Hi

Thank you very much. This is now working as per your suggestion

Regards
Sanjay

Christopher Issac Sunder K [Syncfusion]
Replied On May 31, 2019 12:04 PM UTC

Hi Sanjay,  
 
Thanks for the update. 
 
We are glad to hear that the provided suggestion worked for you. Please get back to us if you require any further assistance. 
 
Thanks,
Christo
 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon