or
$("#grid").kendoGrid({ dataSource: dataSource, pageable: true, height: 340, toolbar: ["create"], columns: [{"field":"firstName","title":"First name"},{"field":"nickName","title":"Nick Name","template":"#= kendo.toString(nickName,'MM/dd/yyyy') #"},{"field":"lastName","width":"150px","editor":lastNameEditor},
{"command":"destroy","title":" ","width":"110px"}] , editable: true }); }); var dataSource = new kendo.data.DataSource({ parameterMap: function(options, operation) { //alert(operation); return kendo.stringify(options); if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } }, transport: { read: {dataType: "json", type: "POST",data: {"SQLCMD":"SELECT * FROM gridTest","Table":["firstName","nickName","lastName"],"PrimaryKey":"peopleID"}}, update: { type: "POST" }, destroy: { type: "POST" }, create: { type: "POST", data: { req: ["firstName","nickName","lastName"] } } }, // determines if changes will be send to the server individually or as batch batch: false, //... pageSize: 30, data: blankData, autoSync: true, schema: { model: { id: "peopleID", fields: {
"peopleID":{"editable":false,"nullable":true},
"firstName":{"type":"string","validation":"required":true},"nullable":false,"defaultValue":""},
"nickName":{"type":"date","validation":{"required":true},"nullable":false,"parse":function(value) { return kendo.toString(value) }},
"lastName":{"type":"string","validation":"required":true},"nullable":false}} } , parse: function (data) { // alert(data); return data; } } });Employee[] empList = new Employee[6];empList[0] = new Employee() { Name = "CA", State = "A", Department = "xyz" };empList[1] = new Employee() { Name = "ZP", State = "B", Department = "xyz" };empList[2] = new Employee() { Name = "AC", State = "B", Department = "xyz" };empList[3] = new Employee() { Name = "AA", State = "A", Department = "xyz" };empList[4] = new Employee() { Name = "A2", State = "A", Department = "pqr" };empList[5] = new Employee() { Name = "BA", State = "B", Department = "pqr" };<ul id="treeView"> <li>1 <ul> <li>1.1</li> </ul> </li> <li>2 <ul> <li>2.1 <ul> <li>2.1.1</li> </ul> </li> </ul> </li></ul>$(document).ready(function () { $("#treeView").kendoTreeView();});is this the right way to get a column with check boxes? checkBox is an empty string ( "" ) which i'm getting from controller columns.Bound(p => p.checkBox).ClientTemplate("<input type= 'checkbox' id= 'chkbox' onchange= 'chkchnage()' />").Title("");columns.Bound(p => p.frontOffice).Title("Rule Description").HeaderHtmlAttributes(new { style = "text-align:center" });...DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .Model(model => model.Id(m => m.checkBox)) //not sure why I added this.Model id is mandatory it seems
.PageSize(20) ) .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple)) .Resizable(resize => resize.Columns(true)) .Editable(editing => editing.DisplayDeleteConfirmation(true)) .Navigatable() .Pageable() .Sortable().Render();