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

Enable Swipe (right/left) dynamically based on the status of listview item

Hi Team, 

We have a requirement to enable the swipe to delete based on the status of each listview item, if the status of one item = New, we should be able to enable the swipe and if the status = closed, we should not enable the swipe. 

Could you please help me on this ?


1 Reply

DB Dinesh Babu Yadav Syncfusion Team May 30, 2019 11:41 AM UTC

Hi Sairam, 
Thank you for contacting Syncfusion support. 
You can achieve the reported requirement by using Cancel args of SwipeStarted event. Based on the Status, return boolean value to start the swiping for the particular item. 
Code Example [C#]: 
private void ListView_SwipeStarted(object sender, SwipeStartedEventArgs e) 
   var itemdata = e.ItemData as ListViewInboxInfo; 
   e.Cancel = itemdata.Status; 
For your reference, we have prepared the sample and you can download it from the below link. 
Please let us know if you require further assistance. 
Dinesh Babu Yadav 

Live Chat Icon For mobile
Up arrow icon