Row validation error message

5 posts, 0 answers
  1. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Sep 2012

    Posted 15 Mar 2010 Link to this post

    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 ?

  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    866 posts
    Member since:
    Sep 2012

    Posted 18 Mar 2010 Link to this post

    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.

  3. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Sep 2012

    Posted 19 Mar 2010 Link to this post

    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 ?

  4. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    866 posts
    Member since:
    Sep 2012

    Posted 24 Mar 2010 Link to this post

    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.

  5. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Sep 2012

    Posted 24 Mar 2010 Link to this post

    Thank you sir

Back to Top