How to disable validation error while using CellEditTemplate

4 posts, 0 answers
  1. Michał
    Michał avatar
    2 posts
    Member since:
    Oct 2013

    Posted 29 Apr 2015 Link to this post

    I've got RadGridView with couple of columns. Most of them are standard GridViewDataColumn (or combobox). Some of them uses CellEditTemplate to do some custom editing.

    When I edit standard ones, validation errors are shown from edit control - as in attachment1.

    When I edit custom ones, validation errors are shown normal at first, but when I try to leave control I get validation error from edit control and cel level - as in attachment2.

    How can I make this custom columns behave like standard ones?

  2. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 04 May 2015 Link to this post

    Hi Michał,

    I tried reproducing such validation behavior, however I was not able to. Can you please shed more light on how are you validating data using RadGridView?

    In addition, you can check the different validation approaches that RadGridView supports in the Validating documentation article.

    Best Regards,
    Stefan
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. Michał
    Michał avatar
    2 posts
    Member since:
    Oct 2013

    Posted 04 May 2015 in reply to Stefan Link to this post

    Hi Stefan,

    I'm using IDataErrorInfo. For each wpf control I'm using there's a style which sets Validation.ErrorTemplate to ErrorTopTemplate (you can see it in attachment1.png), and additionally it sets background to lightred and border to red. It works well, except for datagridview. When I use standard editor for column it works as if intedet, but every custom editor for columns behaves like threres additional errorTEmplate for cel.

  4. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 06 May 2015 Link to this post

    Hello Michał,

    Since you define custom validation, I suggest you disabling the default validation of RadGridView. This can be achieved by setting ValidatesOnDataErrors property to "None". If this does not work for your scenario, may I ask you to open a new support thread with a sample project attached, illustrating the exact project setup?

    Best Regards,
    Stefan
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top