Hello,
I have the following grid implementation:
<kendo-grid name="grid"
auto-bind="true"
selectable="multiple, row"
persist-selection="true"
on-change="Grid_SelectionChanged"
on-data-bound="Grid_Loaded"
on-remove=""
resizable="true">
<datasource type="DataSourceTagHelperType.Ajax" auto-sync="false" server-filtering="true" server-sorting="true" page-size="10"
on-request-end="@MODAL.RequestEndFunctionName" on-error="@MODAL.ErrorHandlerFunctionName">
<transport>
<read url="@Url.Action("ReadItemList", "Users", new { Area = "Admin" })" />
<create url="@Url.Action("Create", "Users", new { Area = "Admin" })" />
<destroy url="@Url.Action("Delete", "Users", new { Area = "Admin" })" />
<update url="@Url.Action("UpdateFromGrid", "Users", new { Area = "Admin" })" />
</transport>
<schema>
<model id="Id">
<fields>
<field name="Enabled" type="boolean" default-value="true"></field>
<field name="LockoutEnabled" type="boolean" default-value="false"></field>
<field name="Id" type="Guid"></field>
<field name="UserName" type="string"></field>
<field name="Email" type="string"></field>
<field name="PhoneNumber" type="string"></field>
</fields>
</model>
</schema>
</datasource>
<groupable enabled="true" />
<editable mode="inline" />
<filterable enabled="true" />
<sortable enabled="true" />
<pageable button-count="5" refresh="true" page-sizes="new int[] { 5, 10, 20, 50, 100, 1000 }" />
<columns>
<column selectable="true" width="37"></column>
<column field="Id" title="Id" hidden="true"></column>
<column field="Enabled"
title="Engedélyezett?"
template="#= getCheckboxHtml(Enabled) #"
editor="ZBoolEditor"
min-screen-width="60"
width="150"></column>
<column field="UserName" title="User name" min-resizable-width="180" width="360" html-attributes='new Dictionary<string, object> { ["style"] = "font-weight: bold;" }'></column>
<column field="Email" title="E-mail address" min-screen-width="180" width="360"></column>
<column field="PhoneNumber" title="Phone number" min-screen-width="180" width="360"></column>
<column field="LockoutEnabled"
title="Locked"
template="#= getLockedHtml(LockoutEnabled) #"
editor="ZBoolEditor"
min-screen-width="600"></column>
<column title="Műveletek" width="150">
<commands>
<column-command text=" " name="edit" visible="false"></column-command>
<column-command text="<span class='fas fa-edit'></span>" name="editinpopup" click="Grid_EditInPopup"></column-command>
<column-command text="<span class='k-icon k-i-close'></span>" name="custom" click="Grid_RemoveItem"></column-command>
</commands>
</column>
</columns>
</kendo-grid>
My problem that the client side validaion not working, I can leave the empty cell without any validation error message and I can press the Update button without restriction. I have data annotations in my model, for example:
[Required(ErrorMessage = "'{0}' mező megadása kötelező!")]
[Display(Name = "E-mail cím")]
[EmailAddress(ErrorMessage = "Az e-mail cím formátuma nem érvényes!")]
[StringLength(255, ErrorMessage = "A(z) '{0}' mező hossza minimum {2}, maximum {1} karakter lehet!", MinimumLength = 5)]
[GridFastEditEnabled()]
public string Email { get; set; }
Thank you for help!