如何在kendo网格内联编辑中添加自定义验证 [英] how to add custom validation in kendo grid inline editing
本文介绍了如何在kendo网格内联编辑中添加自定义验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在剑道网格的内联编辑中添加firld验证
以下是我的剑道网格
how to add firld validation in inline editing of kendo grid
below is my kendo grid
@(Html.Kendo().Grid(Model)
.Name("gridLLPType")
.Columns(columns =>
{
columns.Bound(p => p.ProviderType).Title("Type").Width(150);
columns.Bound(p => p.ProviderTypeName).Title("Type Name").Width(150);
columns.Bound(o => o.Provider_Type_Status).ClientTemplate("# if( Provider_Type_Status == true) { # Active # } else { # InActive # } #")
.Filterable(filterable => filterable.Messages(m => m.IsFalse("InActive"))
.Messages(m => m.IsTrue("Active")))
.Title("Status").Width(80);
columns.Command(command => command.Edit()).Width(200);
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Sortable()
.Scrollable()
.Filterable(filter =>
{
filter.Operators(f => f.ForString(o =>
{
o.Clear();
o.Contains("Contains");
o.DoesNotContain("Does Not Contain");
o.IsEqualTo("Is Equal To");
o.IsNotEqualTo("Is Not Equal To");
o.StartsWith("Starts With");
o.EndsWith("Ends With");
}));
})
.DataSource(dataSource => dataSource
.Ajax()
// // .PageSize(15)
.ServerOperation(false)
.Model(model => model.Id(p => p.Provider_Type))
//.Events(events => events.RequestEnd("OnRequestEnd_gridLLPType"))
.Read(read => read.Action("LLPTypeMasterRead", "NewMasterData", new { area = "AreaMasterData" }))
.Create(update => update.Action("AddLLPProviderType", "NewMasterData", new { area = "AreaMasterData" }))
.Update(update => update.Action("UpdateLLPProviderType", "NewMasterData", new { area = "AreaMasterData" }))
)
)
i必须为ProviderTypeName添加验证作为管理字段。
请帮助我....
i have to add validation for ProviderTypeName as manadatory field .
please help me ....
推荐答案
有一个工作示例这里: Kendo UI Grid小部件的自定义验证示例 [ ^ ]
There is a working example here: Custom Validation example for Kendo UI Grid widget[^]
这篇关于如何在kendo网格内联编辑中添加自定义验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文