RowValidating is not working with NewRow

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    5 posts
    Member since:
    Dec 2012

    Posted 13 Feb 2013 Link to this post

    I use `RowValidating` event for `RadGridView`. It works fine with regular rows, but new row is not getting red when I set `e.IsValid = false;` However, error message displays properly.
    What should I do to get it working?
  2. Yoan
    Admin
    Yoan avatar
    1182 posts

    Posted 14 Feb 2013 Link to this post

    Hi Andrew,

    Does your model/object  implement the INotifyPropertyChanged interface ? If not, I would recommend you to implement it. Then all updates will happen automatically in RadGridView. 

    I believe that this will resolve your problem.

    Greetings,
    Yoan
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Andrew
    Andrew avatar
    5 posts
    Member since:
    Dec 2012

    Posted 14 Feb 2013 Link to this post

    I use EF, how do I implement INotifyPropertyChanged since classes are generated automatically?
  4. Yoan
    Admin
    Yoan avatar
    1182 posts

    Posted 19 Feb 2013 Link to this post

    Hello Andrew,

    Thank you for clarifying that!

    I have tested your scenario with our latest official release (Q3 2012 SP1) and everything is working as expected. For your convenience, I have attached a sample project.

    Would it be possible to let me know what exactly version of RadGridView you are using?

    Kind regards,
    Yoan
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top