Change mode of RadDataForm with MVVM

4 posts, 1 answers
  1. Johannes
    Johannes avatar
    66 posts
    Member since:
    Dec 2012

    Posted 25 Jun 2014 Link to this post

    I use MVVM and I didn't find out yet how to set RadDataForm in "AddNewItem" or "Edit" mode via ViewModel. There is a property "Mode" of type "RadDataFormMode" and it would be great if I can change that property in ViewModel and bind the View to that but sadly it has no setter. So how to achieve this in a MVVM friendly way?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 30 Jun 2014 Link to this post

    Hi,

    Indeed, the Mode property is a ReadOnly.
    What I can suggest you invoking the proper RadDataFormCommands (for example RadDataFormCommands.AddNew) in code.

    Regards,
    Didie
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Johannes
    Johannes avatar
    66 posts
    Member since:
    Dec 2012

    Posted 01 Jul 2014 in reply to Dimitrina Link to this post

    For the moment I use a custom DataFormCommandProvider and invoke the commands as you suggested but that makes it necessary to import some Telerik stuff into my ViewModel project and I don't like that. Until now my ViewModel project was a Portable Class Library so I can use it with a Telerik WPF UI and a non-Telerik Windows Phone UI. Now I have to use separate ViewModel projects just because there is no way to set the RadDataForms mode directly. That works but as I said it would be great if we can just set the Mode property to another value.
  5. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 02 Jul 2014 Link to this post

    Hi,

    Thank you for sharing your feedback. We will consider it for the future versions.

    Regards,
    Didie
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top