or
function KendoUIGrid(config){ var grid = $("#" + config.id); grid.kendoGrid({ columns: config.columns, dataSource: { transport: { read: { url: config.url, dataType: "JSON", type: "POST", data: { action: 'read' } }, //destroy: { // url: config.url, // dataType: "JSON", // type: "POST", // data: { // action: 'destroy' // } //}, //update: { // url: config.url, // dataType: "JSON", // type: "POST", // data: { // action: 'update' // } //}, //create: { // url: config.url, // dataType: "JSON", // type: "POST", // data: { // action: 'create' // } //}, parameterMap: function (options) { var result = { page: options.page, pageSize: options.pageSize, skip: options.skip, orderBy: '', take: options.take, pi: options.page == 1 ? 1 : options.skip + 1, pf: options.skip + options.take, action: options.action }; if (options.sort != undefined) { if (options.sort[0] != undefined) { result.orderBy = options.sort != undefined ? options.sort[0]['field'] + ' ' + options.sort[0]['dir'] : ''; } else { result.orderBy = 1; } } return result; } }, schema: { total: "total", data: "data" }, pageSize: 15, serverSorting: true, serverPaging: true, severFiltering: true }, sortable: true, resizable: true, pageable: { numeric: false, input: true }, selectable: true });<h2>Proveedores</h2><div class="box k-shadow"> <div id="grid"> <div class="k-block"> <div class="k-header">Filtro de búsqueda</div> <table> <tr> <td> <input type="text" name="nombre" placeholder="Ingrese el nombre del proveedor" class="k-textbox" /> </td> <td style="width:100px;"> <select> <option>Activo</option> <option>Inactivo</option> </select> </td> </tr> <tr> <td colspan="2"> <button class="k-button">Limpiar</button> <button id="btnFiltrar" class="k-button">Filtrar</button> </td> </tr> </table> </div> </div></div$(document).ready(function () { var config = { id: 'grid', url: BaseUrl('mantenimiento/ProveedorGrid'), columns: [ { field: "id", title: "id", width: 50, hidden: true }, { field: "nombre", title: "Nombre" }, { command: [ {template: KendoUILinkButton(BaseUrl('mantenimiento/proveedor'), 'edit')}, {template: KendoUILinkButton(BaseUrl('mantenimiento/ProveedorGrid'), 'delete')} ], width: 88 } ] }; KendoUIGrid(config); $("#btnFiltrar").click(function () { $("#grid") .data("kendoGrid") .dataSource.filter({ filters: [ { field: "nombre", operator: "startswith", value: "Paul" } ] }); })})function mobileListViewTemplatesInit() { $("#termin-listview").kendoMobileListView({ dataSource: kendo.data.DataSource.create({ transport: { read: { url: urlTermine, dataType: "json", data: { gn: id }} }, group: "Datum" }), template: $("#customListViewTemplate").html(), headerTemplate: "<h2 class='termin-title'>Termine am ${value}</h2>" }); }Unhandled exception at line 9, column 25731 in http://localhost:11499/Scripts/kendo/2013.1.319/kendo.all.min.js0x800a03ec - JavaScript runtime error: Expected ';'@(Html.Kendo().Grid(Model)<BR> .Name("Grid")<BR> .Columns(columns =><BR> {<BR>foreach (System.Data.DataColumn column in Model.Columns)<BR> {<BR> if (column.ColumnName != "Id")<BR>columns.Bound(column.ColumnName).Groupable(true);<BR> }<BR> })<BR> .Pageable()<BR> .Sortable()<BR> .Scrollable()<BR> .Filterable()<BR> .Groupable()<BR> .ColumnMenu()<BR> .DataSource(dataSource => dataSource<BR> .Ajax()<BR> .Model(model =><BR> {<BR>foreach (System.Data.DataColumn column in Model.Columns)<BR> {<BR> if(column.ColumnName != "Id")<BR>model.Field(column.ColumnName, column.DataType);<BR> } <BR> })<BR> .Read(read => read.Action("Read", "Home"))<BR> .PageSize(20)<BR> )<BR>)<BR>@(Html.Kendo() .Grid<MyModel> .Name("grid") .DataSource(…) .Scrollable() .Columns(columns => { columns.Bound(…).Width(300); columns.Bound(…).Width(200); columns.Bound(…).Width(300); columns.Bound(…).Width(200); columns.Bound(…).Width(200); columns.Bound(…).Width(500); }))<table><colgroup><col /><col /></colgroup>...</table><table><colgroup><colgroup><col /><col /></colgroup></colgroup>...</table>