or
<script type="text/x-kendo-tmpl" id="ItemTemplate"> <div style="margin:5px;"> #:ItemNo# - #:Description#<br /> </div></script><%: Html.Kendo().ListView<ItemList>().Name("Items")<br> .TagName("div" .DataSource(ds =>
ds.Read(read => read.Action("ItemListRead", "Home"))
.Model(m => m.Id(i => i.ItemKey))) .ClientTemplateId("ProjectItemTemplate") .Selectable(s => s.Mode(ListViewSelectionMode.Single)) .Events(events => events.Change("onChange"))%><script type="text/javascript"> function onProjectItemChange(e) { var selected = $.map(this.select(), function (item) { return $(item).text(); }); }</script>Html.Kendo().Scheduler<TaskViewModel>() .Name("MyScheduler") .Date(DateTime.Now) .Height(600) .Views(views => { views.DayView(); views.WeekView(weekView => weekView.Selected(true)); }) .DataSource(dataSource => dataSource.Model(m => { m.Id(o => o.Id); }) .ServerOperation(true) .Read(read => read.Action("ReadSchedules", "Scheduler")) ) .Editable(false)$(function () { var grid = $(gridNameForEditors).data("kendoGrid"); grid.bind("dataBound", function () { var grid2 = $(gridNameForEditors); alert(grid2.width()); document.body.style.width = grid2.width() + "px"; }); })
@using (Html.BeginForm(@"Store", @"Admin", FormMethod.Post)){ @(Html.Kendo().Grid((IEnumerable<MyModel>) ViewBag.MyItems) .Name(@"grid") .Columns(columns => { columns.Bound(pg => pg.Id).Visible(false); columns.Bound(pg => pg.Name).Template(
c => Html.ActionLink(c.Name, @"Details", new {id = c.Id})); columns.Command(
commands => commands.Destroy().Text("Delete")).Title("Delete"); }) .Pageable() .Sortable() .DataSource( dataSource => dataSource .Server() .Model(model => model.Id(p => p.Id)) .Destroy(d => d.Action(@"Item_Destroy", @"Admin"))) )}