@(Html.Kendo().Grid<ParentModel>() .Name("grd") .Columns(columns => { columns.Bound(e => e.FirstName).Width(110); }) .Sortable() .Pageable() .Scrollable() .ClientDetailTemplateId("template") .HtmlAttributes(new { style = "height:430px;" }) .DataSource(dataSource => dataSource .Ajax() .PageSize(6) .Read(read => read.Action("SampleAction", "ControllerName").Data("passSampleId")) ) .ClientDetailTemplateId("template") .Events(events => events.DataBound("dataBound")) ) <script id="template" type="text/html"> <div> @(Html.Kendo().Grid<ChildModel>() .Name("grd") .Columns(columns => { columns.Bound(o => o.Sample).Width(70); columns.Bound(o => o.Sample).Width(110); columns.Command(o => o.Edit().Text("Reschedule")).Title("Commands"); columns.Command(o => o.Edit().Text("Confirm")).Title("Commands"); }) .DataSource(dataSource => dataSource .Ajax() .Model(model => model.Id(c => c.SampleId)) .PageSize(10) .Read(read => read.Action("LoadReadAction", "ControllerName", new { SampleId= "1" })) .Update(Update => Update.Action("LoadEditAction", "ControllerName", new { SampleId= "1" })) .Update(Update => Update.Action("LoadEditAction", "ControllerName", new { SampleId= "1" })) ) .Pageable() .Sortable() .ToClientTemplate() ) </div> </script> <script> function dataBound() { this.expandRow(this.tbody.find("tr.k-master-row").first()); } </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)