jqGrid giving exception when json is attempted to be loaded

I have the following html in my site:

<link type="text/css" href="/Styles/ui-lightness/jquery-ui-1.8.2.custom.css" rel="Stylesheet" />
<link type="text/css" href="/Styles/ui.jqgrid.css" rel="Stylesheet" />
<script type="text/javascript" src="/Scripts/jquery-1.4.2.min.js" ></script>
<script type="text/javascript" src="/Scripts/jquery-ui-1.8.2.min.js" ></script>
<script type="text/javascript" src="/Scripts/grid.locale-en.js" ></script>
<script type="text/javascript" src="/Scripts/jquery.jqGrid.min.js" ></script><link type="text/css" rel="Stylesheet" href="Styles/Site.css" />


<script type="text/javascript">
    $(document).ready(function () {
            url: '/Release/GetScheduledReleases',
            datatype: "json",
            mtype: 'POST',
            colNames: ['Id', 'Version', 'Name', 'Scheduled Date'],
            colModel: [
                { name: 'id', width: 55 },
                { name: 'version', width: 90 },
                { name: 'name', width: 100 },
                { name: 'date', width: 90 }
            autowidth: true,
            sortname: 'date',
            viewrecords: true,
            sortorder: "desc",
            caption: "Scheduled Releases"


<table id="tblScheduledReleases"></table>
<div id="divScheduledPager"></div>

Now when this loads the grid shows with the correct columns and then shows the Loading message. However, it is perpetually stuck in the loading section. Opening up the chrome console shows the following error:

Uncaught TypeError: Cannot read property '0' of undefined in jquery.jqGrid.min.js:14

Here is the Json being returned by my webserver requested by the jqGrid:

    {"id":"37","version":"","name":"4.14 Patch 8","date":"2010-07-08"},
    {"id":"39","version":"","name":"4.15 Patch 3","date":"2010-07-08"},
    {"id":"36","version":"","name":"4.13 Patch 11","date":"2010-07-15"},
    {"id":"40","version":"","name":"4.15 Patch 4","date":"2010-07-22"},
    {"id":"38","version":"","name":"4.14 Patch 9","date":"2010-07-22"},
    {"id":"30","version":"","name":"4.16 Release","date":"2010-07-30"}

Why am I getting this exception?


You should include

 jsonReader : { repeatitems: false }

in the jqGrid parameters.

Need Your Help

Search through PDF files with PHP

php search pdf

I'm trying to find a way to search inside PDF files. I came accross the PHP PDF class but I can't seem to find any function for reading/searching a filestream.

IE6 Text goes missing in dl tag

html css internet-explorer-6

I'm testing a website in Internet Explorer 6 and I am baffled by this issue.