This question is locked. New answers and comments are not allowed.
I've created click method that dynamically creates a window.
When I click the button, I get the error "Unable to get value of the property 'create': object is null or undefined". I've added the references to the script files as shown below to the top of my partial view and get the same error.
I've also tried adding these same script files to my ScriptRegistrar statement in Layout.cshtml instead of adding them to the partial view.
I still get the same error. What am I doing wrong with regards to getting the appropriate js files loaded?
$("#buttonProductCatalog").click(function (e) { e.preventDefault(); if (productCatalog == null) { productCatalog = $.telerik.window.create({ name: "ProductCatalog", title: "Product Catalog", contentUrl: '@Url.Action("ProductDialog", "Product")', modal: true, draggable: true, width: 900, height: 600, onClose: function (e) { productCatalog_onClose(); } }); } $('#ProductCatalog').data('tWindow').center().open();})When I click the button, I get the error "Unable to get value of the property 'create': object is null or undefined". I've added the references to the script files as shown below to the top of my partial view and get the same error.
@(Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Add("telerik.common.min.js") .Add("telerik.draganddrop.min.js") .Add("telerik.window.min.js")))I've also tried adding these same script files to my ScriptRegistrar statement in Layout.cshtml instead of adding them to the partial view.
@(Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Add("telerik.common.min.js") .Add("telerik.draganddrop.min.js") .Add("telerik.window.min.js") .Combined(true) .CacheDurationInDays(5) .Compress(true)) .Globalization(true) .jQuery(false) )I still get the same error. What am I doing wrong with regards to getting the appropriate js files loaded?