【发布时间】:2014-05-28 21:00:51
【问题描述】:
我想为某些 CatalogProductId 禁用 DiscountPercentageMRC/NRC/Usage 列。请在下面找到网格的 javascript。任何帮助将不胜感激。
<h2>Kendo Grid bound to ASP.NET MVC action methods</h2>
@* The DIV where the Kendo grid will be initialized *@
<div id="grid"></div>
<script>
$(document).ready(function () {
$("#grid").kendoGrid({
columns: [
{ field: "CompanyId"},
{ field: "CompanyName" },
{ field: "DiscountPercentageMRC" },
{ field: "CatalogProductId"},
{ field: "DiscountPercentageMRC" },
{ field: "DiscountPercentageNRC" },
{ field: "DiscountPercentageNRC" },
{ field: "DiscountPercentageUsage"}
],
height: 400,
editable: true, // enable editing
pageable: true,
sortable: true,
filterable: true,
toolbar: ["create", "save", "cancel","edit"], // specify toolbar commands
dataSource: {
serverPaging: true,
serverFiltering: true,
serverSorting: true,
pageSize: 10,
batch: true,
editable: "inline",
transport: {
read: {
url: "@Url.Action("ResellerDiscountsGet", "AccountDetail", new { BusOrdId = @ViewBag.Message })",
type: "POST",
}
}
},
selectable: true
});
});
</script>
【问题讨论】:
标签: kendo-ui kendo-grid