I corrected code by your suggestions, but I have the same problems.
Actually I have this code, if I remove HTML Helper of grid into template, window shows, but If I insert again HTML Helper, windows not shows.
[...]
//Main grid shows products list
//User click on this button to open details of 1 product
columns.Command(command => command.Custom("ItemLedgerEntryCommand").Text(" ").IconClass("k-icon k-i-arrow-drill").Click("showDetails"));
[...]
@(Html.Kendo().Window()
.Name("itemLedgerEntries")
.Title("Movimenti (DATI DEMO)")
.LoadContentFrom("GetItemLedgerEntries", "Home")
.Visible(false)
.Iframe(true)
.Height(600)
.Width(1100)
.Resizable()
.Draggable()
.Modal(true)
.Events(e=>e.Activate("onActivateIleWindow"))
)
<
script
type
=
"text/x-kendo-template"
id
=
"ileTemplate"
>
<
div
id
=
"details-container"
>
<
div
>
<
div
hidden
id
=
"itemNoKey"
>#= No #</
div
>
<
div
>
@(Html.Kendo().Grid<
ItemLedgerEntryModel
>()
.Name("ileGrid")
.Filterable()
.AutoBind(true)
.Columns(columns =>
{
columns.Bound(f => f.DocumentNo);
columns.Bound(f => f.OrderNo);
columns.Bound(f => f.VendorNo);
columns.Bound(f => f.PostingDate).Format("{0:dd/MM/yyyy}");
columns.Bound(f => f.EntryType);
columns.Bound(f => f.UnitOfMeasureCode);
columns.Bound(f => f.Quantity).Format("{0:N2}").HtmlAttributes(new { style = "text-align: right;" });
})
.Sortable() // Enable sorting
.Pageable()
.Scrollable(scrollable => scrollable.Virtual(true))
.DataSource(dataSource => dataSource //Configure the Grid data source.
.Ajax() //Specify that Ajax binding is used.
.Read(read => read.Action("LedgerEntries", "ItemLedgerEntry").Data("itemNoData"))
).ToClientTemplate()
)
</
div
>
</
div
>
</
div
>
</
script
>
<
script
>
//Called by details grid (it contained by Telerik Window)
function itemNoData(e) {
e.preventDefault();
var itemNoGet = $("#itemNoKey").value();
//alert(itemNoget);
return {
itemNo: itemNoGet
}
}
[...]
//Called by custom command of main grid
function showDetails(e) {
e.preventDefault();
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
var wnd = $("#itemLedgerEntries").data("kendoWindow");
//alert("Codice Articoli: " + dataItem.No);
var detailsTemplate = kendo.template($("#ileTemplate").html());
wnd.content(detailsTemplate(dataItem));
wnd.center().open();
}
[...]
</
script
>