or
$("#grid_detail").kendoGrid({
dataSource: {
data: orders
},
filterable: {
extra: false,
operators: {
string: {
contains: "Contains",
}
}
},
sortable: true,
columns: [
{
field: "Buyer",
title: "buyer",
width: "40"
},
{
field: "name",
title: "Article name",
width: "40"
},
{
field: "paid",
title: "Paid",
width: "20",
filterable: false
}
]
});
filterable: function(element){ element.kendoAutoComplete({ dataSource: orders, dataTextField: "buyer", })}$("#workSplitter").kendoSplitter({ orientation: "horizontal", panes: [ { collapsible: false, size: "20%" }, { collapsible: false, size: "80%" } ], resize: function () { window.setTimeout(function () { if (tabExists("Transactions")) { resizeGrid("#mainGrid"); } resizeGrid("#activityGrid"); }, 1); }});function resizeGrid(gridSelector) { var element = $(gridSelector), dataArea = element.find('.k-grid-content'), elementHeight = element.innerHeight(), otherElements = element.children().not('.k-grid-content'), otherElementsHeight = 0; otherElements.each(function () { otherElementsHeight += $(this).outerHeight(); }); dataArea.height(elementHeight - otherElementsHeight);}#workTabs { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: auto; height: auto;}#workTabs > .k-content { position: absolute; top: 34px; bottom: 0; left: 0; right: 0;}$("#search-grid").kendoGrid({ dataSource: { transport: { read: { url: "a URL" } }, schema: { data: "data" } }, columns: [{field:"Name",title:"Name"}]});var testdata = { "data": [{ "Name": "TestY" }] };var searchViewModel = kendo.observable({ init: function () { $("#search-grid").kendoGrid({ dataSource: { data: testdata, /* transport: { read: { url: "a URL" } }, */ schema: { data: "data" } }, columns: [{field:"Name",title:"Name"}] }); }HTTP/1.1 200 OKContent-Length: 27Content-Type: application/JSONServer: Microsoft-IIS/7.5X-Powered-By: ASP.NETDate: Fri, 07 Jun 2013 20:00:59 GMT{"data":[{"Name":"TestY"}]}