This is a migrated thread and some comments may be shown as answers.

Still Validation

8 Answers 80 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 24 Apr 2013, 09:09 AM
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

8 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 25 Apr 2013, 02:47 PM
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.

0
Vladimir
Top achievements
Rank 1
answered on 20 Jun 2013, 07:42 AM
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
0
Ivan Ivanov
Telerik team
answered on 25 Jun 2013, 01:42 PM
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.

0
Vladimir
Top achievements
Rank 1
answered on 26 Jun 2013, 10:15 AM
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
0
Ivan Ivanov
Telerik team
answered on 01 Jul 2013, 02:28 PM
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 >>
0
Vladimir
Top achievements
Rank 1
answered on 02 Jul 2013, 06:27 AM
Hi Ivan

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

Thanks

Vitalij
0
Craig
Top achievements
Rank 1
answered on 14 Mar 2014, 12:15 PM
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
0
Yoan
Telerik team
answered on 19 Mar 2014, 09:40 AM
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.

 
Tags
PropertyGrid
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Ivan Ivanov
Telerik team
Vladimir
Top achievements
Rank 1
Craig
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or