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

Row validation error message

4 Answers 106 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marc Roussel
Top achievements
Rank 2
Marc Roussel asked on 15 Mar 2010, 03:19 PM
Hi,

I'm in the RowValidating and I use e.IsValid = false.  The line becomes red.  That's prety fine but how do I advise the user of what is the cause ? There's no e.ErrorMessage or any way to show the user a message saying ops, the problem is bla bla ?

4 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 18 Mar 2010, 12:54 PM
Hi Marc Roussel,

Indeed you cannot set anything more within the RowValidating handler than e.IsValid = false.
I'll try to clarify this a little.
RadGridView supports two layers of validation UI and Data layer. Row(Cell)Validating events handle UI validation and if everything is OK data validation is performed. And after that RowValidated event is fired (this event is fired no matter if data validation is performed or not).

So you can set some custom tooltip within the RowValidated handler this will handle both cases of possible validation failure.

I'm attaching a sample project that demonstrates this approach. Let me know how it works on your end. The attached example uses Data validation but the idea is similar with UI validation.

Greetings,
Nedyalko Nikolov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Marc Roussel
Top achievements
Rank 2
answered on 19 Mar 2010, 11:54 AM
Hi,

Based on what I saw.

Does that mean I can add these static methods in my DataContract ?

Because each row represent a DataContract in my case

IYou see, I'm back from my WCF service with a DataContract. How the implementation is done with Validator as for your PersonValidator.cs ? Can I have let say JobValidator as yours and having my Job (DataContract) modified to suit the validation mecanism as I see in your Person.cs ?
0
Nedyalko Nikolov
Telerik team
answered on 24 Mar 2010, 01:21 PM
Hi Marc Roussel,

Unfortunately the current version of the RadGridView for Silverlight doesn't support async validation. We are doing our best in order to add such support for the official SL 4 version of our controls, since INotifyDataErrorInfo interface is not available for SL 3.

Best wishes,
Nedyalko Nikolov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Marc Roussel
Top achievements
Rank 2
answered on 24 Mar 2010, 01:26 PM
Thank you sir
Tags
GridView
Asked by
Marc Roussel
Top achievements
Rank 2
Answers by
Nedyalko Nikolov
Telerik team
Marc Roussel
Top achievements
Rank 2
Share this question
or