Hello,
I defined my class field “TeamCode” as string type and only accept 4 characters. It function well in regular Kendo TextBox. But it does not work on Kendo grid cell when do editing. Validation not happen when box lose cursor. I knew clicking submit/Add/Update button validation will go through, but I still hope validation occurring on lose cursor. Is anyone have an idea to do so? (Below are partial of code)
...
[StringLength(4, MinimumLength = 4, ErrorMessage = "{0} must be 4 characters.")]
[DisplayName("Team Code")]
public string TeamCode { get; set; }
…
Thanks.
5 Answers, 1 is accepted
Hello Zhihong,
I tested myself Grid filed validation over DataAnnotation Attributes and I can say it works correctly. Upon blurring out the edited field the validator is fired and a validation message is displayed
More information on validation can be obtained in the following article:
For your convenience, I am attaching the testing project. Please examine it and let me know if you have any questions.
Regards,
Nikolay
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Hi Zhihong,
You are most welcome and please let me know if anything further arises.
Regards,
Nikolay
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Thanks for your help Nikolay! I just have another post with title "Length validation in cell does not work on Kendo Grid cell edit ".
Could you take a look? Thank you very much.
Hi Zhihong,
Another colleague of mine is already working on it. Please expect a reply shortly.
Regards,
Nikolay
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.