Note that there are some explanatory texts on larger screens.

plurals
  1. POjgGrid not showing data using asp.Net MVC 3.0
    primarykey
    data
    text
    <p>I am having a problem showing json data returned from my view in jgGrid 4.0 in the head section I have</p> <pre><code>&lt;script src="/Scripts/jquery-1.5.2.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Scripts/modernizr-1.7.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery.lazyload.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Scripts/global.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery-ui-1.8.11.min.js" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p> </p> <p>the body </p> <p> $(document).ready(function () {</p> <pre><code> jQuery("#grid").jqGrid({ url: '@Url.Action("getusers", "dashboard",new {area="Security"})', datatype: "json", mtype: "GET", colNames: ['Id', 'UserName'], colModel: [ { name: 'Id', index: 'Id',width: 200, align: 'left'}, { name: 'UserName', index: 'UserName', width: 200, align: 'right' } ], rowList: null, pgbuttons: false, pgtext: null, viewrecords: false, page:false, caption: "Users" }); }); </code></pre> <p>here the Action code returning a json</p> <pre><code>public JsonResult GetUsers() { var repo = ObjectFactory.GetInstance&lt;IRepository&lt;User&gt;&gt;(); var result = (from x in repo.Query(x =&gt; x.ApplicationName == "DBM") select new {Id=x.Id, UserName=x.UserName}).ToArray(); return this.Json(result, JsonRequestBehavior.AllowGet); } } </code></pre> <p>I tested in both firefox and IE 9 the grid renders empty, no errors in firebug and data looks OK. any hints would be appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload