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

[Solved] DateTime editing in Grid, can not pass validation. How to replace with customized validation?

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yui
Top achievements
Rank 1
Yui asked on 10 Dec 2012, 10:26 AM
In my Telerik MVC grid, I'm using AJAX loading data. 

There is one column's type is DateTime, and the default validation always fail with error message "The field [field name] must be a number.". I have tried to put in all different type of Datetime format and even just number as the error message, but can not pass the validation. 

I have set globalization in site web.config as: 
"<system.web>
<globalization culture="en-GB" uiCulture="en-GB"/>
</system.web>".


So , the question will be how to turn off validation for single field in the Grid?

And is there a way to replace with the customized validation?

I have been on this for two days, can not find any solution or article, can somebody please help me out or just point me to some article or tutorial or something. 

Thanks a lot. 

1 Answer, 1 is accepted

Sort by
0
Yui
Top achievements
Rank 1
answered on 11 Dec 2012, 02:44 PM
Found out at the end, it was actually Telerik Grid do not support entities with relationship, it's nothing to do with the date time error. 

Solution is, have to create a flat entity with no relationship as a view model, and convert it back to original entity when trying to save. 

However, I still want to know if there is any way to customize the cell validation myself. 

Can anybody please help?

Thanks a lot.
Tags
Grid
Asked by
Yui
Top achievements
Rank 1
Answers by
Yui
Top achievements
Rank 1
Share this question
or