我卡在我想验证 Shift Day 的 Column 并将其限制为 Unique Data 的地方,我有一个 DropDownlist for Days 但我想在它已经在 Kendo Grid 中时显示一条消息。.
这是我的剑道网格
$("#customerContactGrid").kendoGrid({
scrollable: false,
sortable: true,
pageable: true,
dataSource: {
transport: {
read: {
url: '/Client/LoadClientCustomerLocationContactList?clientCusLocId=' + clientCusLocId,
dataType: "json",
type: "POST"
}
},
pageSize: 10
},
rowTemplate: kendo.template($("#clientContactTemplate").html().replace('k-alt', '')),
altRowTemplate: kendo.template($("#clientContactTemplate").html())
});
这是我的下拉列表
<span>
@Html.DropDownList("ddlShiftDay", new SelectList(ViewBag.ShiftList, "ID", "Display_Value", clientCustomerShiftDay), "[Please Select]",
new Dictionary<string, object>
{
{"class","validate[required] inputLong"}
})
</span>
这是我的控制器:
private void GetShiftList()
{
// get status list from lookups
var shiftlist = (from a in db.Lookups
where a.Domain == "AVAILABLEDAY"
select a).ToList();
// add status list to a data container be called in view
ViewBag.ShiftList = shiftlist;
}
希望有人可以帮助我显示一条消息,提示用户是否输入了网格列中已经存在的数据