How to enable and disable Swiping for particular items in SFListView control?
In the SFListView we have to set AllowSwiping=true for getting swipe view actions.
But when I'm trying to enable or disable based on the condition for particular item in list its not working.
I'm checking like this:
Though both values are true it does not show the Swipe. It only works if I set it directly like AllowSwiping=true
Hi Divyesh Bhatt,
We have checked your requirement , you can cancel the swiping for a particular item in SwipeStarting event , Please refer the below documentation for more reference.
UG Link: https://help.syncfusion.com/maui/listview/swiping#swipestarting-event
Kindly let us know if you have any concerns
Regards,
Suthi Yuvaraj.
Hi Suthi,
I've check the SwipeStarting and it does work. Can we convert this event to command using EventToCommandBehavior of maui community toolkit? If yes, how?
I have tried to use EventToCommandBehavior of maui community toolkit but not getting e.cancle in that.
Divyesh Bhatt,
We have checked your requirement , you can convert the SwipeStarting event to command by EventToCommand behavior. we have attached the sample which explains about to convert event to command.
We have attached the documentation which explains about passing parameter for command
Please let us know if you have any concerns.
Attachment: MauiListView_d719ee3c.zip
This you have provided for ItemTapped, I want EventToCommandBehavior for SwipeStarting Event. Because I have to disable swipe based on conditions.
If I follow the way ItemTapped command implemented, in object I will not get both IsEditTable and eventArgs DataItem.
Divyesh Bhatt,
We would like to let you we have attached the KB link for your reference as you can pass the parameter to command in EventToCommand behavior, but we have created a sample for your requirement. Please have a look at the sample and let us know if you have any concerns.
- 5 Replies
- 2 Participants
-
DB Divyesh Bhatt
- May 4, 2024 10:51 AM UTC
- May 10, 2024 01:10 PM UTC