FIX: MVC 4 – jqGrid Theme Issue

Just wasted 30 minutes trying to load the jqGrid theme – and it just won’t load. Tried setting up the new bundle configuration – even tried loading the scripts and css files directly in the <head> of _Layout.cshtml but the theme would still not load.

FIX:

The MVC 4 Project Template inserts the following at the end of footer –

@Scripts.Render(“~/bundles/jquery”)
@RenderSection(“scripts”, required: false)

The jquery files should be loaded in the <head> section – Moving @Scripts.Render(“~/bundles/jquery”) should solve the issue – Even if you load the jquery files in the <head> section explicitly – the @Scripts.Render(“~/bundles/jquery”) at the bottom would cause problem and would not let the theme load.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s