Kendo UI, Asp.net Modal click event
<p>I am doing a project where I have this button inside a grid view,and need the modal to pop up with data inside of it, I saw a similar post on here but they were not using Asp.net-mvc(4.5). <br>
I know the button works, I used a <code>alert()</code> to test it, but when I put this in I get an error </p>

<blockquote>
  <p>"Index:144 Uncaught TypeError: Cannot read property 'content' of null"</p>
</blockquote>

<p>Which is referring to wnd. <code>Content(detailsTemplate(dataItem))</code>. Please lend me your thoughts.</p>

<pre><code>@(
    Html.Kendo().Grid&lt;PartsViewModel&gt;().Name("serializes")
.Columns(columns   =&gt;
    {
        columns.Bound(parts =&gt; parts.PartNumber).Width(40);
        columns.Bound(parts =&gt; parts.DrawingNumber).Width(40);
        columns.Bound(parts =&gt; parts.SupplierName).Width(40);
        columns.Bound(parts =&gt; parts.SupplierNumber).Width(40);
        columns.Bound(parts =&gt; parts.Description).Width(40);
        columns
.Command(command =&gt;  command.Custom("ViewDetails")
.Click("showDetails")).Width(15);
    })
    .Pageable(Settings.Telerik.Grid.Pageable)
    .Sortable(Settings.Telerik.Grid.Sortable)
    .Reorderable(Settings.Telerik.Grid.Reorderable)
    .Resizable(Settings.Telerik.Grid.Resizable)
    .Scrollable(Settings.Telerik.Grid.Scrollable)
    .Filterable(Settings.Telerik.Grid.Filterable)
    .ColumnMenu(Settings.Telerik.Grid.ColumnMenu)
    .DataSource(datasource =&gt; datasource.Ajax()
        .Events(events =&gt; events.Error("error_handler"))
        .PageSize(Settings.Telerik.Grid.Pages.PageSize).Model(model =&gt;
        {
            model.Id(partSearch =&gt; partSearch.PartId);
            model.Field(partSearch =&gt; partSearch.PartNumber);
            model.Field(partSearch =&gt; partSearch.DrawingNumber);
            model.Field(partSearch =&gt; partSearch.SupplierName);
            model.Field(partSearch =&gt; partSearch.RevisionNumber);
            model.Field(partSearch =&gt; partSearch.RevisionDescription);
            model.Field(partSearch =&gt; partSearch.RevisionDate);
            model.Field(partSearch =&gt; partSearch.ShortDescription);
            model.Field(partSearch =&gt; partSearch.ShortDescription);
            model.Field(partSearch =&gt; partSearch.PurchasingComments);
            model.Field(partSearch =&gt; partSearch.ManufacturingComments);
            model.Field(partSearch =&gt; partSearch.EngineeringComments);
            model.Field(partSearch =&gt; partSearch.Description);
        })
        .Read(read =&gt; read.Action("ReadPartSearch", "PartsSearch"))
        /*.Create(update =&gt; update.Action("CreateParts", "Search"))*/)
)

@section scripts{
&lt;script type="text/x-kendo-template" id="template"&gt;
    &lt;div id="details-container"&gt;
        &lt;h2&gt;#= Created # #= LastName #&lt;/h2&gt;
        &lt;em&gt;#= Title #&lt;/em&gt;
        &lt;dl&gt;
            &lt;dt&gt;City: #= City #&lt;/dt&gt;
            &lt;dt&gt;Address: #= Address #&lt;/dt&gt;
        &lt;/dl&gt;
    &lt;/div&gt;
 &lt;/script&gt;

 &lt;script&gt;     
    var detailsTemplate = kendo.template($("#template").html());

    function showDetails(e) {
        e.preventDefault();

        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));

        var wnd = $("#Details").kendoWindow({
            title: "Details",
            content: "Created",
            modal: true,
            visible: false,
            resizable: false,
            width: 300
        }).data("kendoWindow");
        detailsTemplate = kendo.template($("#template").html());

        wnd.content(detailsTemplate(dataItem));
        wnd.center().open();
    }

    function error_handler(args) {
        searcher.kendoGrid.errorHandler($("#serializes"), args);
    };

    function clearFilter(e) {
        e.preventDefault();
        var grid = $("#serializes").data("kendoGrid");
        grid.dataSource.filter({});
    };
    $(function () {
        //searcher.kendoGrid.initClearButton($("#serializes"), clearFilter);
        searcher.kendoGrid.autoResize($('#serializes'), getSubtractors());
    });
&lt;/script&gt;
}
</code></pre>