This question is locked. New answers and comments are not allowed.
I have a Class Library that contains some common scripts that I use across multiple projects.
The class library contains an embedded resource that has some script related to common grid functionality.
In this case I am trying to bind data to the grid such as:
The web asset is loaded it just fails on the first line of the above callback:
grid is undefined, the data() method is not working for some reason.
If I take this same script and just include it into the MVC project and not use the resource from the Class Library, everything works fine (Using the ScriptRegistrar). Do I have to use the Script Registrar to have this functionality work properly? If so how can I include a web asset as an added script to the registrar?
So I know its not the actual script problem, it seems to be that the embedded resource doesn't have a reference to some telerik library.
In my class library, I have a reference to Telerik.Web.Mvc, I also included a folder in my Class Library called "Scripts/2011.1.315/" with all the Telerik scripts in it.
Is there something I am missing?
The class library contains an embedded resource that has some script related to common grid functionality.
In this case I am trying to bind data to the grid such as:
$.post(rooturl + "HomeController/GetGridData", function (data) { var grid = $('#' + gridid).data('tGrid'); grid.dataBind(data.Data); }
The web asset is loaded it just fails on the first line of the above callback:
var grid = $('#' + gridid).data('tGrid');
grid is undefined, the data() method is not working for some reason.
If I take this same script and just include it into the MVC project and not use the resource from the Class Library, everything works fine (Using the ScriptRegistrar). Do I have to use the Script Registrar to have this functionality work properly? If so how can I include a web asset as an added script to the registrar?
So I know its not the actual script problem, it seems to be that the embedded resource doesn't have a reference to some telerik library.
In my class library, I have a reference to Telerik.Web.Mvc, I also included a folder in my Class Library called "Scripts/2011.1.315/" with all the Telerik scripts in it.
Is there something I am missing?