Dynamically show different "tap-to-execute" actions with swipe actions (RadListView)

397 views Asked by At

The Telerik Progress UI documentation for RadListView swipe actions shows how to implement static "tap-to-execute" actions (RadListView - Swipe Actions), but is there a way to dynamically change, let's say the left-side action, based on some sort of outside data or the list item that is being swiped?

For Example in the IOS mail app, if a message is marked as Unread and you swipe right, the left-side action shows the option to mark it as "Read". And alternatively, if a message is marked as Read and you swipe right, the left-side actions shows the option it as "Unread". The action is determined by the list view item itself.

Is this possible with RadListView Swipe Actions?

1

There are 1 answers

9
Manoj On BEST ANSWER

Yes, You could do that. Use the itemSwipeProgressStarted event in which you will have access to both the current list item that's being swiped and swipeView. Based on the data, you could modify components inside your swipe view, get them by id and play with visibility to show / hide items and set swipe limits based on current measurements.