or
<div class="k-widget k-grid" id="grid_AitTodaySectionEntity"><table><colgroup><col /><col /><col /><col /><col /><col /><col /></colgroup><thead class="k-grid-header"><tr><th class="k-header k-filterable" data-field="Caption" data-title="Caption" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=Caption-asc">Caption</a></th><th class="k-header k-filterable" data-field="DefaultRows" data-title="Default Rows" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=DefaultRows-asc">Default Rows</a></th><th class="k-header k-filterable" data-field="Id" data-title="Id" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=Id-asc">Id</a></th><th class="k-header k-filterable" data-field="ModuleId" data-title="Module Id" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=ModuleId-asc">Module Id</a></th><th class="k-header k-filterable" data-field="TodaySection" data-title="Today Section" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=TodaySection-asc">Today Section</a></th><th class="k-header k-filterable" data-field="IsNew" data-title="Is New" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=IsNew-asc">Is New</a></th><th class="k-header k-filterable" data-field="IsDirty" data-title="Is Dirty" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=IsDirty-asc">Is Dirty</a></th></tr></thead><tbody><tr class="t-no-data"><td colspan="7"></td></tr></tbody></table><div class="k-pager-wrap k-grid-pager"><a class="k-link k-state-disabled" data-page="1" href="#" title="Go to the first page"><span class="k-icon k-i-seek-w">seek-w</span></a><a class="k-link k-state-disabled" data-page="0" href="#" title="Go to the previous page"><span class="k-icon k-i-arrow-w">arrow-w</span></a><ul class="k-pager-numbers k-reset"><li><span class="k-state-selected" data-page="1">1</span></li></ul><a class="k-link k-state-disabled" data-page="2" href="#" title="Go to the next page"><span class="k-icon k-i-arrow-e">arrow-e</span></a><a class="k-link k-state-disabled" data-page="1" href="#" title="Go to the last page"><span class="k-icon k-i-seek-e">seek-e</span></a><span class="k-pager-info k-label">No items to display</span></div></div><script> jQuery(function(){jQuery("#grid_AitTodaySectionEntity").kendoGrid({"columns":[{"title":"Caption","field":"Caption","filterable":{},"encoded":true},{"title":"Default Rows","field":"DefaultRows","filterable":{},"encoded":true},{"title":"Id","field":"Id","filterable":{},"encoded":true},{"title":"Module Id","field":"ModuleId","filterable":{},"encoded":true},{"title":"Today Section","field":"TodaySection","filterable":{},"encoded":true},{"title":"Is New","field":"IsNew","filterable":{},"encoded":true},{"title":"Is Dirty","field":"IsDirty","filterable":{},"encoded":true}],"pageable":{"buttonCount":10},"sortable":true,"filterable":true,"scrollable":false,"dataSource":{"transport":{"prefix":"","read":{"url":"/Grid/Get?Type=AitTodaySectionEntity"}},"pageSize":10,"page":1,"total":0,"serverPaging":true,"serverSorting":true,"serverFiltering":true,"serverGrouping":true,"serverAggregates":true,"type":"aspnetmvc-ajax","filter":[],"schema":{"data":"Data","total":"Total","errors":"Errors","model":{"fields":{"Caption":{"type":"string"},"DefaultRows":{"type":"number","defaultValue":null},"Id":{"type":"number"},"ModuleId":{"type":"number"},"TodaySection":{"type":"string"},"ModModule":{"type":"object"},"Fields":{"type":"object"},"IsNew":{"type":"boolean"},"IsDirty":{"type":"boolean"},"ActiveContext":{"type":"object"},"ConcurrencyPredicateFactoryToUse":{"type":"object"},"AuthorizerToUse":{"type":"object"},"AuditorToUse":{"type":"object"},"Validator":{"type":"object"}}}}}});});</script>{ "$id": "1", "Data": [ { "$id": "2", "Caption": "Calendar", "DefaultRows": 5, "Id": 1, "ModuleId": 9, "TodaySection": "CALENDER" }, { "$id": "3", "Caption": "Repairs", "DefaultRows": 999, "Id": 2, "ModuleId": 2, "TodaySection": "EXP_REPAIRS" }, { "$id": "4", "Caption": "Maintenance", "DefaultRows": 999, "Id": 3, "ModuleId": 2, "TodaySection": "EXP_MAINTENANCE" }, { "$id": "5", "Caption": "CPI", "DefaultRows": 999, "Id": 4, "ModuleId": 3, "TodaySection": "TODAY.CIP" }, { "$id": "6", "Caption": "Notifications", "DefaultRows": 999, "Id": 5, "ModuleId": 1, "TodaySection": "EXP_NOTIFICATIONS" }, { "$id": "7", "Caption": "Tasks", "DefaultRows": 999, "Id": 6, "ModuleId": 4, "TodaySection": "EXP_TASKS" }, { "$id": "8", "Caption": "Support cases", "DefaultRows": 999, "Id": 7, "ModuleId": 5, "TodaySection": "EXP_SUPPORT" }, { "$id": "9", "Caption": "Call ToDo", "DefaultRows": 999, "Id": 8, "ModuleId": 12, "TodaySection": "CALL_TODO" }, { "$id": "10", "Caption": "My VoiceMail Messages", "DefaultRows": 999, "Id": 9, "ModuleId": 12, "TodaySection": "MY_VOICEMAIL" }, { "$id": "11", "Caption": "Today Call-Log", "DefaultRows": 999, "Id": 10, "ModuleId": 12, "TodaySection": "TODAY_CALL_LOG" }, { "$id": "12", "Caption": "My Discussions", "DefaultRows": 999, "Id": 11, "ModuleId": 15, "TodaySection": "TODAY_MY_DISCUSSION" }, { "$id": "13", "Caption": "Legal Control appointments", "DefaultRows": 20, "Id": 12, "ModuleId": 19, "TodaySection": "LC_APPOINTMENTS" }, { "$id": "14", "Caption": "Repairs2", "DefaultRows": 999, "Id": 13, "ModuleId": 20, "TodaySection": "EXP_REPAIRS2" }, { "$id": "15", "Caption": "Maintenance2", "DefaultRows": 999, "Id": 14, "ModuleId": 20, "TodaySection": "EXP_MAINTENANCE2" }, { "$id": "16", "Caption": "CPI2", "DefaultRows": 999, "Id": 15, "ModuleId": 22, "TodaySection": "TODAY.CIP2" }, { "$id": "17", "Caption": "Overdue Maintenances2", "DefaultRows": 999, "Id": 16, "ModuleId": 20, "TodaySection": "EXP_MAIN_OVER2" }, { "$id": "18", "Caption": "Top CIPs", "DefaultRows": 50, "Id": 17, "ModuleId": 22, "TodaySection": "TODAY.CIP.TOP" }, { "$id": "19", "Caption": "Measures", "DefaultRows": 999, "Id": 18, "ModuleId": 23, "TodaySection": "TODAY.MEASURES" }, { "$id": "20", "Caption": "Under min. stock", "DefaultRows": 999, "Id": 19, "ModuleId": 8, "TodaySection": "TODAY.STOCK_UNDER_MINIMUM" } ], "Total": 19, "AggregateResults": null, "Errors": null}Function [Get](type As String, <Kendo.Mvc.UI.DataSourceRequest()> request As DataSourceRequest) As ActionResult Dim result As Object Using daa As New DataAccessAdapter(ConfigurationManager.AppSettings("ConnectionString")) Dim linq As New LinqMetaData(daa) Dim assets As IQueryable(Of AitTodaySectionEntity) = linq.AitTodaySection result = assets.ToDataSourceResult(request) End Using Dim json As New JsonNetResult json.Data = result Return jsonEnd Functionpublic class ParentWidget
{
public int ID { get; set; }
public int Name { get; set; }
//... other properties
public List<ChildWidget> ChildWidgets
}
public class ChildWidget : ParentWidget
{
public int Parent_ID { get; set; }
//... other properties
}
<div class="float-left" style="width:100%; margin-top:4px;">@(Html.Kendo().Grid(Model.ParentWidgets).Name("grid") .Columns(columns => { columns.Bound(p => p.ID).Width(48).Title("Parent ID"); columns.Bound(p => p.Name); }) .ClientDetailTemplateId("subrow") .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("HierarchyBinding_Widgets", "Widget", new { parentId = "#=ID#", someParameter = Model.SomeParameter })) ) .Events(events=>events.DataBound("dataBound")) .ToClientTemplate() )</div><script id="subrow" type="text/kendo-tmpl"> @(Html.Kendo().Grid<WebUI.Models.Widget>().Name("grid_#=ID#")// <--parent row ID, thus #=HasChildren# would actually be for the parent? .Columns(columns => { columns.Bound(p => p.Parent_ID).Width(48).Title("Parent ID"); columns.Bound(p => p.ID).Width(48).Title("ID"); columns.Bound(p => p.Name).ClientTemplate("what goes here?"); //Name should be a link if *this* Widget.HasChildren is false }) .ClientDetailTemplateId("subrow") .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("HierarchyBinding_Widgets", "Widget", new { parentId = "#=ID#", someParameter = (Int32.Parse(Model.SomeParameter)) })) ) .Events(events=>events.DataBound("dataBound")) .ToClientTemplate() )</script>function createChart() { $("#chart").kendoChart({ title: { text: "Units sold" }, seriesDefaults: { width: 2, markers: { visible: false, }, overlay: { gradient: null } }, series: [{ type: "area", transitions: false, width: 2, data: [ 150, 200, 50 ] }], valueAxis: { labels: { visible: true }, line: { visible: false } }, categoryAxis: { categories: [ new Date("2012/02/01 00:00:00"), new Date("2012/02/10 00:00:00"), new Date("2012/02/20 00:00:00") ], baseUnitStep: "auto", autoBaseUnitSteps: { days: [1] } } }); }<form data-bind="submit: submitJbSearch"> <ul data-role="listview"> <li> <label>Job <input type="text" placeholder="Job Number" data-bind="value: test" /> </label> </li> <li> <label>Status <select data-bind="options: statuses"> </select> </label> </li> <li> <label>Customer <input type="text" placeholder="Customer" /> </label> </li> <li> <label>PO# <input type="text" placeholder="PO#" /> </label> </li> </ul> </form><a href="#" data-bind="click: submitJbSearch" data-role="button">Submit</a>