I use automatic column validation in RadGridView (ValidatesOnDataErrors="InViewMode" in every column). If some row's cell has error, RadGridView show whole row as incorrect. How can I change this behavior and display errors only in the cells themselves, and not in whole rows?
3 Answers, 1 is accepted
In order to resolve your problem, may I ask you which method for validation you are using? If you do not have any validation logic (using framework validation) you will get the validation error for a cell.
I can suggest you to check this help article, where you can find information about GridView's validation.
Looking forward to hearing from you!
Yoan
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

I use MVVM pattern and IDataErrorInfo. Here is an example of declaring a column in the View:
<telerik:GridViewDataColumn MinWidth="80" Width="100" Header="Январь" DataMemberBinding="{Binding Month01.V.Fact, Converter={StaticResource DecimalToStringConverter}}" TextAlignment="Right" ValidatesOnDataErrors="InViewMode">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<ctrl:ArticleValueCellControl IsChecked="{Binding Month01.V.Formula}" IsCheckable="{Binding Month01.V.HasFormula}" Value="{Binding Month01.V.Fact, Converter={StaticResource DecimalToStringConverter}, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
<telerik:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<ctrl:ArticleValueCellEditControl IsChecked="{Binding Month01.V.Formula, Mode=TwoWay}" IsCheckable="{Binding Month01.V.HasFormula}" Value="{Binding Month01.V.Fact, Mode=TwoWay, Converter={StaticResource DecimalToStringConverter}}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>
In order to achieve your goal, you can predefine GridViewRow's template and manipulate the ItemBackground_Invalid and ItemOuterBorder_Invalid brushes. I can suggest you to check this help article, where you can find information about styling a GridViewRow.
However, I have prepared a sample project showing you the approach.
I hope this helps.
Yoan
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.