Validation

34 posts, 0 answers
  1. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1217 posts

    Posted 17 May 2013 Link to this post

    Hello,

     We will take this into account. Thanks.

    All the best,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  2. Peter
    Peter avatar
    37 posts
    Member since:
    Dec 2011

    Posted 14 Jan 2014 Link to this post

    Hi Ivan,

    I tried your attached project which demonstrates a custom validator for a RadPropertyGrid. The example works as it shows a red border around the Textbox if you enter an invalid value. But the error message ("The input value should be odd integer and should be in specified range: {10, 20}.")  is not shown!
     
    Worse: I built the with our current commercial Telerik WPF-Controls version 2013.3.1204.40 and now not even the red border is shown!

    How do I use RadPropertyGrid with property level validation???

    It works with IDataErrorInfo, but that is not what I want I'd like to give validation hints to the user for validation logich in the property setters (
    Validator.ValidateProperty)
    
  3. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 17 Jan 2014 Link to this post

    Hi Peter,

    Thank you for the feedback.

    I've modified the project with the following code and the validation border and message are shown as expected:

    private void radPropertyGrid_AutoGeneratingPropertyDefinition(object sender, Telerik.Windows.Controls.Data.PropertyGrid.AutoGeneratingPropertyDefinitionEventArgs e)
            {
                (e.PropertyDefinition.Binding as Binding).ValidatesOnExceptions = true;
                (e.PropertyDefinition.Binding as Binding).NotifyOnValidationError = true;
            }

    Let me know if you have additional questions.

    Regards,
    Yordanka
    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 >>
  4. Peter
    Peter avatar
    37 posts
    Member since:
    Dec 2011

    Posted 17 Jan 2014 Link to this post

    Hi Yordanka,

    thank you. these two lines were missing. Now the example is working like expected.

    Regards from Düsseldorf, Germany.
Back to Top