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

prevent validation on firing on empty cells

1 Answer 165 Views
GridView
This is a migrated thread and some comments may be shown as answers.
al
Top achievements
Rank 1
al asked on 29 Jan 2017, 08:53 AM

hi dera all,

i have binded a table to the gridview. now, the grid cell for example double type, errors when the user left it empty and does not let user to go to the other cells. i do not need it. 

i need to user to freely go to the different cells and only caugh on the inputting wrong datatype forexample inputting string instead of double (not lefting a double cell empty). how can i disable built in validation for this?

also i need to check the cells manually and under certain circumestances, change the color of dell border to be red and else black. what does you suggest?

best regards.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 01 Feb 2017, 03:13 PM
Hi Al,

The built-in mechanism for satisfying this requirement, you can set the ValidatesOnDataErrors property of RadGridView to InViewMode. Note, that it can be used when the validation is performed through the IDataErrorInfo or INotifyDataErrorInfo interfaces. More information can be found in the Validating topic of RadGridView's online help.

As to modifying the background color of given cells depending on a property value, please, review the CellStyleSelector topic.

I hope you find this helpful.

Regards,
Stefan X1
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
al
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or