How to Use Crosslight to Prevent Deleting an Item from DataListViewModelBase?

2 replies. Last post: August 19, 2015 5:59 AM by Jimmy Tungol
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Jimmy TungolMember

Hi,

How do you prevent users from deleting specific items or an item that has a NotDeletable column/field name? Please provide a sample code snippet for iOS and Android only, since for WinPhone, WinRT... this should be straightforward. So yeah, samples for iOS and Android... please? 

We understand for iOS that this might be possible by binding the CanDelete on cell item level, which is bound to a row. But not quite sure about that for iOS though. On Android, hmmm... this one might be tricky since it does not have customization for edit actions on cell level, but I could be wrong. We assume that's how it is for Android since holding/pressing on an item long enough will popup a new check list view where you can select the items that you can delete. But how do you disable checking an item that should not be deleted? Meaning you should not be able to check/select an item from the list if it's tagged as NotDeletable == true.

Again, samples for both iOS and Android would be very much helpful. Thanks!

All times are GMT -5. The time now is 4:40 PM.
Previous Next