I am having a problem making the IgniteUI igrid display in an MVC view. This is despite the fact that it appears, at least to me, that the appropriate data and igrid JavaScript are being retrieved and generated,
For example, the html wrapper generates the following, as viewed from the page source:
And to emphasize the fact that I dont see the grid, here is a screen shot of empty space as I see it on the generated view (red of course added by me =) )
As I'm fairly new to IgniteUI, it's more than likely that I am forgetting a required wrapper method or library reference. Any help from those with more experienced eyes would be much appreciated!
To help figure out what I might be doing wrong I will include, in an archive, the controller and view code and the generated view
Hello Kristopher ,
Thank you for posting in our forum.
I’ve looked through your code and most probably the loader and the resources are not being loaded.
I see that you’re setting them in a section. Are you rendering that section on one of the Shared views?
Keep in mind that the loader and its related scripts need to be loaded on the same view on which the grid is defined. Otherwise you would have to set the Resources of the Loader’s wrapper to include the grid so that it will know for which controls' resources it should load .
For example:
@(
Html.Infragistics().Loader()
.ScriptPath(Url.Content("~/Infragistics/js/"))
.CssPath(Url.Content("~/Infragistics/css/"))
.Resources("igGrid")
.Render()
)
Also note that the path to the ig loader script needs to point to the Infragistics.loader.js file. I see that you’ve set:
<script src="@Url.Content("~/samplescommon/jQuery/common/js/infragistics.loader.js")"></script>
If your local scripts are in the Infragistics/js folder then this should be:
<script src="/Infragistics/js/infragistics.loader.js"></script>
Let me know if you have any questions or concerns.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://ko.infragistics.com/support
Thank you, Maya, my igrid's are now visible.
Didn't realize I needed to have the loader script within the view rather than the shared layout; makes sense now that you pointed it out.
Many thanks,
Kris