Enable / Disable Swipe on radlistview

721 Views Asked by At

I'm building an app using nativescript, javascript and telerik ui. I need need to know how crate a function to enable / disable the swipaction on radlistview by code. Best regards

1

There are 1 best solutions below

3
On BEST ANSWER

When using the swipeActions="true" of RadListView from the nativescript-telerik-ui plugin in order to implement an enable/disable solution all that you need to do is:

  • Attach an handle for the itemSwiping event as shown here
  • In the handler set the returnValue of the arguments to the desired boolean value, as shown here

The same example is available in the official nativescript-telerik-ui sdk repository for Angular here and for Vanila {N} here (look for the files with swipe-disable in their name)