or
schema: { model: { id: "id", fields: { id: { type: "string" }, orderId: { type: "number" }, lineNo: { type: "number" }, itemNo: { type: "string" }, ... price: { type: "number" }, qty: { type: "number" }, comment: { type: "string" }, }, total: function () { return (this.get("qty") * this.get("price")).toFixed(2); } }}$scope.mainGridOptions = { dataSource: { transport: { read: function (e) { $http({ method: 'GET', url: myUrl, cache: true }). success(function (data) { e.success(data); }). error(function (data, status) { console.log(status); }); } }, serverPaging: false, serverSorting: false, schema: { model: { fields: { expiryDate: { type: "date" } } } } }, sortable: true, filterable: { mode: "row, menu", operators: { date: { gt: "After", lt: "Before" } } }
}
<label for="contactFilter">Filter by contact name:</label><input id="contactFilter" type="search" value="" />$(document).ready(function () { $("#contactFilter").kendoComboBox({ placeholder: "contact name", dataTextField: "Name", dataValueField: "Id", filter: "contains", autoBind: false, minLength: 3, dataSource: { type: "json", serverFiltering: true, transport: { read: { url: siteRoot + "Groupings/ContactsTypeahead" } } } }); });Public Function ContactsTypeahead(filterString As String) As JsonResult Dim contacts As Attenda.Cmdb.ServerGroups.Core.SupportworksService.Contacts = _supportworks.SearchContacts(filterString) Dim retVal = contacts.Select(Function(x) New With {.Id = x.ContactID, .Name = x.FirstName & " " & x.Surname}).ToList() Return Json(retVal, JsonRequestBehavior.AllowGet)End Function