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

Disable multi select on ListView with Checkbox

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

3 Replies

AB Ashokkumar Balasubramanian Syncfusion Team 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. 



SA Sanjay May 30, 2019 10:48 AM UTC

Hi

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

Regards
Sanjay


CI Christopher Issac Sunder K Syncfusion Team 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
 


Loader.
Live Chat Icon For mobile
Up arrow icon