I am using the Jquery grid with knockout and MVC 3 and am getting a "Function Expected" error when the extensions/infragistics.ui.grid.knockout-extensions.js file loads. The error breaks right at this line of script in the file: "ko.bindingHandlers.igCell={init:function(c,e,a,f,b){}..."
I am using igLoader as follows:
<script type="text/javascript" src="@Url.Content("~/scripts/infragistics.loader.js")"></script>
<script type="text/javascript">
$.ig.loader({
scriptPath: "@Url.Content("~/scripts")",
cssPath: "@Url.Content("~/content")",
resources: "igGrid.*,extensions/infragistics.datasource.knockoutjs.js,extensions/infragistics.ui.grid.knockout-extensions.js"
});
</script>
I have copied the GridKnockoutjsBasic.html and GridKnockoutjsBasicController from the Infragistics samples into my app and the Northwind files (db and js) and ran it....the text boxes all fill in with the first row data just like in the grid knockout sample however the grid does not display. I had to remove the "extensions/infragistics.ui.grid.knockout-extensions.js" part from the igLoader:
scriptPath: "/Scripts/",
cssPath: "/Content/",
or else I get the "function expected" error. Not sure if removing this is what causes the grid to not show up but if I leave it in I get the error and if I ignore it, the grid still does not display.
Hi,
Unfortunately I was unable to reproduce your problem. Attached you can find my samples for both 12.1 RTM(build 1010) and 12.1 SR(build 2023). Please review them and see if they can help you resolve your problem.
Because KnockoutJS is client side solution I exclude that the reason can be in the MVC 3 framework.
The file infragistics.ui.grid.knockout-extensions.js is where the grid instantiation happens and removing it will not try to create the grid at all. In the infragistics.datasource.knockoutjs.js is located the data source object which is responsible for communication with the KnockoutJS. Both these files play major role in KnockoutJS integration.
Note: Apart from having "Knockout JavaScript library" included in the sample you also need "Knockout Mapping plugin" which you can find in my samples as (knockout-latest.debug.js and knockout.mapping-latest.debug.js respectively).
I suspect that the cause of the problem is somewhere in the view model.
Can you attach the sample which reproduces the problem so I can investigate it?
Hope this helps,
Martin Pavlov
Infragistics, Inc.
Hello mlacy1358,
Thank you for your patience. I have a few questions concerning this matter. Is the JavaScript file in the location indicated in the loader? Can you please run fiddler alongside your website and see if you get any errors when running?
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com