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

How to disable validation error while using CellEditTemplate

3 Answers 386 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michał
Top achievements
Rank 1
Michał asked on 29 Apr 2015, 01:08 PM

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?

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 May 2015, 08:35 AM
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.

 
0
Michał
Top achievements
Rank 1
answered on 04 May 2015, 08:50 AM

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.

0
Stefan
Telerik team
answered on 06 May 2015, 03:17 PM
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.

 
Tags
GridView
Asked by
Michał
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Michał
Top achievements
Rank 1
Share this question
or