DataForm "Soft Delete"

4 posts, 1 answers
  1. Jon
    Jon avatar
    5 posts
    Member since:
    Jul 2010

    Posted 18 Jan 2012 Link to this post

    Hi,

    I was wondering if it is possible to setup the WPF data form to do a soft delete without removing the item "deleted" from the collection.  Thanks in advance for any advice/help.

    Sincerely,

    Jon
  2. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 19 Jan 2012 Link to this post

    Hi Jon,

     There is no such functionality in RadDataForm however I believe that you can bind the form to a special collection wrapping your original collection in order to add your custom delete logic.

    Kind regards,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Jon
    Jon avatar
    5 posts
    Member since:
    Jul 2010

    Posted 19 Jan 2012 Link to this post

    Vlad,

    Thanks for the reply.  We have found more cases than not for needing soft deletes recently.  Is there a good place I can request this as a feature?

    Thanks,

    Jon
  5. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 20 Jan 2012 Link to this post

    Hello Jon ,

    I have talked to the team but they were pessimistic about the future of such feature. The general opinion is such problem should be solved at the data layer level rather than at the UI.  I believe the approach with custom collection or an intermediate proxy collection  is as close as we can get.

    I am not sure about the practical purpose of such setup , but I may recommend to use an observable collection as source for RadDataForm. This way you can listen to the collection changed events of this collection and manage your original collection. In other words what you delete form the observable collection bound to the RadDataForm  will not be deleted from the original collection.

    Kind regards,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top