or
BondProceeds: function(){ return this.get("UnderlyingPar") * (this.get("UnderlyingPrice")/100); },TotalAmount: function(){ return this.get("BondProceeds") - this.get("FloaterAmount"); }@(Html.Kendo() .Grid<Partial.Model>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.Id).Hidden(true).ClientTemplate("<span id=\"Id\">#: Id #</span>"); columns.Bound(p => p.Names); columns.Bound(p => p.Another); }) .Sortable() .Filterable() .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("Action", "Controller")).Filter(r=>r.Add(a=>a.Id==1))))
.DataSource(dataSource => dataSource .Server() .Model(model => model.Id(p => p.id)) .Destroy(excluir => excluir.Action("ExcluirOnOff","Home")))[AcceptVerbs(HttpVerbs.Post)]public ActionResult ExcluirOnOff(int OnOffID){ moneymanagerBDEntities _db = new moneymanagerBDEntities(); var product = _db.tbl_001.FirstOrDefault(p => p.id == OnOffID); var routeValues = this.GridRouteValues(); if (product != null) { return RedirectToAction("Index", routeValues); } return RedirectToAction("Index", routeValues);}<script> $(document).ready(function () { var crudServiceBaseUrl = "http://demos.kendoui.com/service", dataSource = new kendo.data.DataSource({ transport: { read: { url: crudServiceBaseUrl + "/Products", dataType: "jsonp" }, update: { url: crudServiceBaseUrl + "/Products/Update", dataType: "jsonp" }, destroy: { url: crudServiceBaseUrl + "/Products/Destroy", dataType: "jsonp" }, create: { url: crudServiceBaseUrl + "/Products/Create", dataType: "jsonp" }, parameterMap: function(options, operation) { if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } } }, batch: true, pageSize: 30, schema: { model: { id: "ProductID", fields: { ProductID: { editable: false, nullable: true }, ProductName: { validation: { required: true } }, UnitPrice: { type: "number", validation: { required: true, min: 1} }, Discontinued: { type: "boolean" }, UnitsInStock: { type: "number", validation: { min: 0, required: true } } } } } }); $("#grid").kendoGrid({ dataSource: dataSource, navigatable: true, pageable: true, height: 400, toolbar: ["create", "save", "cancel"], columns: [ "ProductName", { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: 150 }, { field: "UnitsInStock", title: "Units In Stock", width: 150 }, { field: "Discontinued", width: 100 }, { command: "destroy", title: " ", width: 110 }], editable: true }); }); </script><script> $(document).ready(function () { var crudServiceBaseUrl = "http://demos.kendoui.com/service", dataSource = new kendo.data.DataSource({ transport: { read: { url: crudServiceBaseUrl + "/Products", dataType: "jsonp" }, update: { url: crudServiceBaseUrl + "/Products/Update", dataType: "jsonp" }, destroy: { url: crudServiceBaseUrl + "/Products/Destroy", dataType: "jsonp" }, create: { url: crudServiceBaseUrl + "/Products/Create", dataType: "jsonp" }, parameterMap: function(options, operation) { if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } } }, batch: true, pageSize: 30, schema: { model: { id: "ProductID", fields: { ProductID: { editable: false, nullable: true }, ProductName: { validation: { required: true } }, UnitPrice: { type: "number", validation: { required: true, min: 1} }, Discontinued: { type: "boolean" }, UnitsInStock: { type: "number", validation: { min: 0, required: true } } } } } }); $("#grid").kendoGrid({ dataSource: dataSource, navigatable: true, pageable: true, height: 400, toolbar: ["create", "save", "cancel"], columns: [ "ProductName", { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: 150 }, { field: "UnitsInStock", title: "Units In Stock", width: 150 }, { field: "Discontinued", width: 100 }, { command: "destroy", title: " ", width: 110 }], editable: true }); }); </script> var window = $("#window");
window.kendoWindow({ width: "505px", height: "315px", title: "Mail", actions: ["Refresh", "Maximize", "Close"], content:"inbox/getemail.aspx?msgid="+msgid, iframe:false }); window.data("kendoWindow").open();script language="javascript">var messageData;$.fn.getMessageData = function(){ messageData = { time:'2012-07-26 12:34:50', sender:'test@test.com', subject:'Testing message data' };};$(function(){ var template = kendo.template($("#template").html()); $.fn.getMessageData(); $("#preview").html(template(messageData)); });</script><script type="text/x-kendo-template" id="template"> <h3>#= subject #</h3> <h4>posted on #= time # by <strong>#= sender #</strong></h4> </script> <div id="preview"></div>