Still Validation

9 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 24 Apr 2013 Link to this post

    I searched the forum and found several threads about validation - error display.

    In some of them like
    here http://www.telerik.com/community/forums/wpf/property-grid/autogeneratepropertydefinitions-true-templates-tooltips.aspx
    or http://www.telerik.com/community/forums/wpf/property-grid/validation.aspx

    I found
    Unfortunately, with the current version of RadControls, RadPropertyGrid lacks a proper way of displaying the validation error messages. However, we plan to introduce such (possibly a validation summary) with the incoming service pack of Q1.
    (Feb. 29 2012 - LAST YEAR)
    And
    As a side note, please let me bring to your attention that we have planned to introduce a few validation improvements, including a validation summary for RadPropertyGrid.
    Also Feb. 2012

    So I guess you talked about Q1 SP1 2012.
    And a had a look at the documentation - but found nothing about this.

    Is there a feature like "Summary error" or so?

    Manfred
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 25 Apr 2013 Link to this post

    Hello Manfred,

     Unfortunately, we had to drop this feature, so currently RadPropertyGrid does not host its own native validation summary. I can provide assistance for integrating an external validation summary with RadPropertyGrid, in case such an approach would be good for you. Please, let me know.

    Kind regards,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Vitalij
    Vitalij avatar
    35 posts
    Member since:
    Dec 2010

    Posted 20 Jun 2013 Link to this post

    Hi Ivan

    I am interested in creating external validation summary. How can I achieve it?? How can I bind error content from various control type in RadPropertyGrid such as datetime, text, combobox an so on into custom validation summary??

    Thanks 

    Vitalij
  5. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 25 Jun 2013 Link to this post

    Hello  Vitalij,

     We will prepare such an example for the SDK in the close future. Meanwhile, may I ask you what type of validation logic you are using, so that I can give you some guidelines about implementing such a summary?

    Regards,
    Ivan Ivanov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Vitalij
    Vitalij avatar
    35 posts
    Member since:
    Dec 2010

    Posted 26 Jun 2013 Link to this post

    Hi Ivan.

    I have implemented IDataErrorInfo interface and added event to the PropertyGrid as the example shows. It works well... If the user enters invalid input the textbox gets red it is OK. I have a Title, it is required, it must be at least 5 char long and max length is 255. I have added these requirements into a description. I have added the requirements to the IDataErrorInfo interface, but I do not have any option to show him what he did wrong. Or I have multiple required fields (comboboxes, radio buttons, datetime, texbox or any combinations of controls).

    Simply I want to inform user what he did wrong. The validation summary in ASP.NET is great...


    If you need some additional info jusk ask.

    Thanks

    Vitalij
  7. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 01 Jul 2013 Link to this post

    Hello,

     I am attaching a sample project that illustrates IDataErrorInfoValidation with ValidationSummary.

    Regards,
    Ivan Ivanov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  8. Vitalij
    Vitalij avatar
    35 posts
    Member since:
    Dec 2010

    Posted 02 Jul 2013 Link to this post

    Hi Ivan

    Thanks for the reply. This is what I was looking for, it is so simple...

    Thanks

    Vitalij
  9. Craig
    Craig avatar
    112 posts
    Member since:
    Nov 2011

    Posted 14 Mar 2014 Link to this post

    Hi
    Regarding the sample posted by Ivan on 1st July 2013. Is it still necessary to manually add the AutoGeneratingPropertyDefinition event handler and set the ValidatesOnDataErrors and NotifyOnValidationError to true for each property definition in the event handler code in UI for WPF (2013.3.1316.40)?
    I ask because currently I have these set in the property grid item binding but I don't get the expected behaviour.
    Thanks
    Craig
  10. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 19 Mar 2014 Link to this post

    Hello Craig,

    Indeed, you need to set the validation properties for the binding. As you already know, this can be achieved using the AutoGeneratingPropertyDefinition event:
    void rpg_AutoGeneratingPropertyDefinition(object sender, Telerik.Windows.Controls.Data.PropertyGrid.AutoGeneratingPropertyDefinitionEventArgs e)
            {
                (e.PropertyDefinition.Binding as Binding).ValidatesOnDataErrors = true;
                (e.PropertyDefinition.Binding as Binding).NotifyOnValidationError = true;
            }

    As for your problem - I've tried to reproduce it using the 2013.3.1316 version of our control, but without any success. You can find attached the mentioned sample project. 

    Regards,
    Yoan
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready