我有这个表格:
@*Some form fields here that accept startDate and endDate*@
<div>
<button id="searchButton">Search</button>
</div>
<div class="col-md-12 row">
@(Html.Kendo()
.Grid<ProjectName.DataModels.Models.Customer>()
.Name("CustomerGrid")
.Columns(columns =>
{
columns.Bound(e => e.CustomerId);
columns.Bound(e => e.SomeCustomerColumn);
})
.ClientDetailTemplateId("OrderDetails")
.AutoBind(false) // Don't load the data yet because I'll need to supply parameters for the fetch
.DataSource(dataSource => dataSource
.Ajax()
.Events(events=>events.Change("loadChildGrid"))
.PageSize(20)
.Model(model => model.Id("CustomerId", typeof(string)))
.Read(read => read.Action("GetCustomersAsync", "Customer").Data("passArguments"))
)
)
<script id="OrderDetails" type="text/kendo-tmpl">
@(Html.Kendo()
.Grid<ProjectName.DataModels.Models.Order>()
.Name("OrderDetails_#=CustomerId#")
.Columns(columns =>
{
columns.Bound(o => o.ProductName);
columns.Bound(o => o.SomeOrderColumn);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Model(model=>model.Id("OrderId"))
.ServerOperation(false)
)
.AutoBind(false)
.ToClientTemplate()
)
</script>
</div>
慕勒3428872
相关分类