or
@model List<Common.Models.Brand>@{ ViewBag.Title = "Maintain Brands";}<h2>Maintain Brands</h2>@(Html.Kendo().Grid(Model) .Name("MaintainBrandsGrid") .Columns(columns => { columns.Bound(brand => brand.BrandId).Title("Id"); columns.Bound(brand => brand.BrandName).Title("Brand Name"); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(185); }) .ToolBar(toolbar => toolbar.Create()) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Scrollable(scr=>scr.Height(430)) .Filterable() .DataSource(dataSource => dataSource .Ajax() .PageSize(20) .ServerOperation(false) .Model( model => model.Id( brand => brand.BrandId)) .Create( create => create.Action("AddBrand", "BrandMaintenance")) .Update( update => update.Action("UpdateBrand", "BrandMaintenance")) .Destroy( delete => delete.Action("RemoveBrand", "BrandMaintenance")) ) )// // POST: /BrandMaintenance/UpdateBrand [AcceptVerbs(HttpVerbs.Post)] public ActionResult UpdateBrand([DataSourceRequest] DataSourceRequest request, Brand brand) { if (brand != null && ModelState.IsValid) { var bll = new CatalogMaintenanceBll(); bll.UpdateBrand(brand); } return Json(new[] { brand }.ToDataSourceResult(request, ModelState)); }<!DOCTYPE html><html><head> <title>Frozen columns</title> <meta charset="utf-8"> <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet"> <link href="../../../styles/kendo.common.min.css" rel="stylesheet"> <link href="../../../styles/kendo.rtl.min.css" rel="stylesheet"> <link href="../../../styles/kendo.default.min.css" rel="stylesheet"> <script src="../../../js/jquery.min.js"></script> <script src="../../../js/kendo.web.min.js"></script> <script src="../../content/shared/js/console.js"></script> <script> </script> </head><body> <a class="offline-button" href="../index.html">Back</a> <div id="example" class="k-content"> <div id="grid"></div> <script> $(document).ready(function() { $("#grid").kendoGrid({ dataSource: { type: "odata", transport: { }, schema: { model: { fields: { OrderID: { type: "number" }, ShipCountry: { type: "string" }, ShipName: { type: "string" }, ShipCity: { type: "string" }, ShipAddress: { type: "string" } } } }, pageSize: 30 }, height: 430, sortable: true, reorderable: true, groupable: true, resizable: true, filterable: true, columnMenu: true, pageable: true, columns: [ { field: "OrderID", title: "Order ID", locked: true, lockable: false, width: 120, footerTemplate: "Order ID" }, { field: "ShipCountry", title: "Ship Country", width: 200, footerTemplate: "Ship Country" }, { field: "ShipCity", title: "Ship City", width: 160, footerTemplate: "Ship City" },{ field: "ShipName", title: "Ship Name", locked: true, width: 200, footerTemplate: "Ship Name" }, { field: "ShipAddress", lockable: false, width: 300, footerTemplate: "Ship Address" } ] }); }); </script></div> </body></html>