Hi All,
I am using Kendo MVC subgrid with client template, and initially its working fine but since few days back subgrid is not loading any data.
Here is my code for Grid. In my case when expanding sub grid its loading column but not the data and also dont seen any event for data load.
<
h3
class
=
"nvs"
>Search Results</
h3
>
@(Html.Kendo().Grid<
DealInfo
>()
.Name("SalesGrid")
.Columns(columns =>
{
columns.Template(@<
text
></
text
>).ClientTemplate("<
input
type
=
'checkbox'
class
=
'master'
/>").Width(30);
columns.Bound(e => e.Nbr).Title("Nbr").Width(160);
columns.Bound(e => e.Name).Title("Name");
columns.Bound(e => e.Name1).Title("Name1");
columns.Bound(e => e.JobTYpe).Title("JobType");
})
.Sortable()
.Scrollable()
.ClientDetailTemplateId("template")
.DataSource(ds => ds
.Ajax()
.PageSize(10)
.Read(r => r.Action("Action", "Controller").Data("jsview.GetSearchCriterion"))
)
.HtmlAttributes(new { style = "height:500px;" })
.Pageable(p => p
.Numeric(true)
.PageSizes(new[] { 10, 20, 50 })
.PreviousNext(true)
)
)
<
div
>
<
script
id
=
"template"
type
=
"text/kendo-tmpl"
>
@(Html.Kendo().Grid<
DealOrdersModel
>()
.Name("grid_#=Nbr#") // template expression, to be evaluated in the master context
.Columns(columns =>
{
columns.Bound(o => o.OrderNbr).Title("Order Number").HeaderHtmlAttributes(new { style = "white-space:normal" });
columns.Bound(o => o.Date).Title("Date").Format("{0:MM/dd/yyyy}").HeaderHtmlAttributes(new { style = "white-space:normal" });
columns.Bound(o => o.Type).Title("Type").HeaderHtmlAttributes(new { style = "white-space:normal" });
columns.Bound(o => o.Type1).Title("Type1").Width(110);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(5)
.Read(read => read.Action("Action1", "Controller", new { Nbr = "#=Nbr#" }))
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
</
script
>
</
div
>