or
@(Html.Kendo().DropDownList() .Name("EnvironmentID") .DataValueField("EnvironmentID") .DataTextField("Name") .DataSource(d => { d.Read(r => r.Action("GetEnvironmentsJsonResult", "Home").Data("getCustomerID()")).ServerFiltering(true); } ) .OptionLabel("Environment"))function getCustomerID() { var row = $(event.currentTarget).closest("tr"); var grid = $(event.currentTarget).closest("[data-role=grid]").data("kendoGrid"); var dataItem = grid.dataItem(row); return { customerID: dataItem.CustomerID }; }columns.Bound(m => m.PatientName).Title("Patient Name").Width(170).Filterable(f => f.Cell(c => c.InputWidth(130)));@(Html.Kendo().Grid<BreezeU.DAL.UserFile>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.Id).Title("Id").Visible(false); columns.Bound(p => p.Title).Title("Name"); columns.Bound(p => p.LastUpdatedOn).Title("ModifiedDate").Format("{0:MM/dd/yyyy}").Width(140); columns.Command(commands => { commands.Destroy(); // The "destroy" command removes data items }).Width(120); }) .Events(ev => ev.Save(@"function(e){setTimeout(function(){$('#Grid').data('kendoGrid').dataSource.sync()})}")) .Editable(editable => editable.Mode(GridEditMode.InCell)) // Use inline editing mode .Filterable() .DataSource(dataSource => dataSource .Ajax() .Model(model => { model.Id(p => p.Id); // Specify the property which is the unique identifier of the model model.Field(p => p.Id).Editable(false); // Make the Id property not editable model.Field(p => p.LastUpdatedOn).Editable(false); // Make the date property not editable }) .PageSize(20) .ServerOperation(false) .Read(read => read.Action("read", "files").Data("getAntiForgery")) // Set the action method which will return the data in JSON format .Update(update => update.Action("update", "files").Data("getAntiForgery")) // Action invoked when the user saves an updated data item .Destroy(destroy => destroy.Action("delete", "files").Data("getAntiForgery")) // Action invoked when the user removes a data item ) .Pageable() // Enable paging .Sortable() // Enable sorting )@(Html.Kendo().Scheduler<xxx.Website.Models.Lesson>() .Name("scheduler") .Date(new DateTime(2014, 12, 12)) .StartTime(new DateTime(2014, 12, 8, 9, 00, 00)) .EndTime(new DateTime(2014, 12, 5, 14, 00, 0)) .Height(700) .AllDaySlot(false) .Views(views => { views.WeekView(); }) .Resources(resource => { resource.Add(m => m.LessonType).Title("Lesson Type").DataTextField("Text").DataValueField("Value").DataColorField("Color").BindTo(new[]{ new { Text = "Group1", Value=1, Color="#DC8166"}, new { Text = "Group2", Value=2, Color="#889DAE"}, new { Text = "Group3", Value=3, Color="#91DE80"}, new { Text = "Group4", Value=4, Color="#FFD24D"} }); }) .Timezone("UTC") .Editable(false) .DataSource(d => d .Model(m => { m.Id(f => f.Id); m.Field(f => f.Title).DefaultValue("No title"); }) .Read(read => read.Action("Read_Scheduler", "Administration").Data("getDates"))))function openTrainWind(trainID) { var window = $("#trainWindow").data("kendoWindow"); window.ajaxRequest("/Trains/_Trains/", { _trainID: trainID }); window.center().open(); }