or
<div data-role="pane" data-layout="side-default" data-transition="slide"> @* Menu: Level 1 *@ <div data-role="view" data-title="Centro Web Panel" id="side-root"> <header data-role="header"> <div data-role="navbar"> <span data-role="view-title"></span> </div> </header> <ul data-role="listview" data-style="inset" @*data-source="splitViewCategories" data-template="categoriesTemplate"*@> @* TODO: Get rid of hard coded stuff *@ <li><a class="km-listview-link" href="#side-inbox" data-role="listview-link">Todo</a></li> <li><a class="km-listview-link" href="" data-role="listview-link">Drafts</a></li> <li><a class="km-listview-link" href="" data-role="listview-link">Pending</a></li> <li><a class="km-listview-link" href="" data-role="listview-link">Completed</a></li> </ul> </div> <div data-role="view" data-title="Todo" id="side-inbox"> <header data-role="header"> <div data-role="navbar"> <a id="back-button" class="nav-button" data-align="left" data-role="backbutton">Back</a> <span data-role="view-title"></span> </div> </header> <ul data-role="listview" data-style="inset"> <li><a class="km-listview-link" href="" data-role="listview-link">Cardiology</a></li> <li><a class="km-listview-link" href="" data-role="listview-link">Radiology</a></li> <li><a class="km-listview-link" href="" data-role="listview-link">All Patients</a></li> </ul> </div></div> @* --> end of left menu area *@
dataSource = new kendo.data.DataSource({ transport: { read: { url: ('<%=Url.Action("GetUserList") %>'), dataType: "json" },{"fclID":3, "fclName":"TestFacility", "fclActive":true, "fclCity":"Mobile", "stateID":3, "state":{"country":null, "stateID":3, "stateName":"Alaska", "stateAbbr":"AK", "ctyID":1}}var fclDataSource = new kendo.data.DataSource({ //datasource for grid batch: false, autosync: true, transport: { create: { url: "/DataService/InsertFacility", dataType: "json", cache: false }, read: { url: "/DataService/GetFacilities", dataType: "json", cache: false }, update: { url: "/DataService/UpdateFacility", dataType: "json", cache: false } }, schema: { model: { id: "fclID", fields: { fclName: { type: "string", validation: { required: true } }, fclCity: { type: "string" }, fclActive: { type: "boolean", defaultValue: false }, stateID: { type: "number", validation: { required: true } } } } }, pageSize: 10 });$('.adminboxlarge').append($('#admingrid').kendoGrid({ dataSource: fclDataSource, height: 600, width: 890, filterable: true, sortable: true, pageable: true, scrollable: false, toolbar: [ { name: "create", text: "Add Facility"} //button to add new row ], columns: [ { field: "fclName", title: "Name", editable: true, filterable: true //width: 250 }, { field: "fclCity", title: "City", editable: true, filterable: true //width: 75 }, { //field: "state.stateAbbr", field: "stateID", template: "#=state.stateAbbr#", title: "State", editor: facilityStateEditor, editable: true, filterable: true //width: 75 }, { command: [ { name: "edit", text: "" } ] //width: 50 } ], editable: { mode: "inline", update: true, // puts the row in edit mode when it is clicked destroy: false, // does not remove the row when it is deleted, but marks it for deletion }, edit: function () { curr_container = this._editContainer; //selects the current edit container //deletes the text from the "Update" and "Cancel" buttons $(curr_container).find("a.k-grid-update").text("").append('<span class="k-icon k-update"/>'); $(curr_container).find("a.k-grid-cancel").text("").append('<span class="k-icon k-cancel"/>'); } }) )function facilityStateEditor(container, options) { //defines facility combobox $('<input data-text-field="stateName" data-value-field="stateID" data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoDropDownList({ dataSource: fclstateDataSource, dataTextField: "stateName", dataValueField: "stateID" }); };<%: Html.Kendo().Grid<Thread.Data.Models.Model>() .Name("Grid") .Columns(columns => { columns.Command(command => { command.Edit(); command.Destroy(); }).Width(190).HtmlAttributes(new { style = "text-align:center;" }); columns.Bound(m => m.ModelID).Hidden(); columns.Bound(m => m.ModelName).Width(140); columns.Bound(m => m.Company).Width(160).ClientTemplate("#= (typeof Company === 'undefined') ? ' ' : Company.CompanyName #").EditorTemplateName("CompanyDropDownList"); columns.Bound(m => m.Job).Width(160).ClientTemplate("#= (typeof Job === 'undefined') ? ' ' : Job.JobName #").EditorTemplateName("JobDropDownList"); columns.Bound(m => m.TempModelNumberFlag).Width(100); columns.Bound(m => m.IsCarryOver).Width(100); columns.Bound(m => m.HoursEstimate).Width(120).ClientTemplate("#= (HoursEstimate === null) ? ' ' : HoursEstimate #"); columns.Bound(m => m.Description).Width(140).ClientTemplate("#= (Description === 'null') ? ' ' : Description #"); columns.Bound(m => m.RetailIntroDate).Width(140).Format("{0:d}");
}) .ClientDetailTemplateId("jobDetailTemplate") .ToolBar(toolBar => { toolBar.Create(); }) .Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InLine)) .HtmlAttributes(new { style = "height: 675px" }) .Pageable() .Sortable() .Scrollable() .Selectable() .Filterable() .Events(events => events.DataBound("dataBound")) .DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .PageSize(15) .Events(events => events.Error("error_handler")) .Model(model => { model.Id(j => j.ModelID); model.Field(j => j.ModelID).Editable(false); model.Field(j => j.AlertCount).Editable(false); model.Field(j => j.ArticleCount).Editable(false); model.Field(j => j.DocumentCount).Editable(false); }) .Read(read => read.Action("Model_Read", "Models")) .Update(update => update.Action("Model_Save", "Models")) .Create(create => create.Action("Model_Save", "Models")) .Destroy(destroy => destroy.Action("Model_Destroy", "Models")) ) %>Data[Object { ModelID=6, ModelName="Test IV", ModelNumber="DSAF", more...}] Total 1AggregateResults nullErrors null