<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic:  JqueryGrid Not Displaying Properly</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jquerygrid-not-displaying-properly</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/jquerygrid-not-displaying-properly/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>drdexter33 on  JqueryGrid Not Displaying Properly</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jquerygrid-not-displaying-properly#p22498</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jquerygrid-not-displaying-properly#p22498</guid>
        	        	<description><![CDATA[<p>I&#39;ve trying to put together my first jqGrid for ASP.NET MVC3 via this tutorial:</p>
<p><a title="http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx " rel="nofollow" href="http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx" target="_blank"></a><a href="http://haacked.com/archi" rel="nofollow" target="_blank">http://haacked.com/archi</a>...d-w.....aspx&#160;</p>
<hr />
<p>The Controller looks like this: </p>
<hr />
<p>public ActionResult jqGridTest(string sidx, string sord, int? page, int? rows)<br />{<br />var jsonData = new<br />{<br />total = 1, // we&#39;ll implement later&#160;<br />page = page,<br />records = 3, // implement later&#160;<br />rows = new[]{<br />new {id = 1, cell = new[] {"1", "-7", "Is this a good question?"}},<br />new {id = 2, cell = new[] {"2", "15", "Is this a blatant ripoff?"}},<br />new {id = 3, cell = new[] {"3", "23", "Why is the sky blue?"}}<br />}<br />};<br />return Json(jsonData, JsonRequestBehavior.AllowGet);<br />}</p>
<hr />
<p>The View is called jqGridTest.cshtml and looks like this: </p>
<hr />
<p>@{<br />ViewBag.Title = "jqGridTest";<br />}<br />&#60;link href="../../Content/ui.jqgrid.css" rel="stylesheet" type="text/css" /&#62;<br />&#60;script src="../../Scripts/jquery-1.4.4.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script src="../../Scripts/jquery.jqGrid.min.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script src="../../Scripts/js/jqDnR.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script src="../../Scripts/js/jqModal.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script type="text/javascript"&#62;<br />jQuery(document).ready(function () {<br />jQuery("#list").jqGrid({<br />url: &#39;/Home/jqGridTest/&#39;,<br />datatype: &#39;json&#39;,<br />mtype: &#39;GET&#39;,<br />colNames: [&#39;Id&#39;, &#39;Votes&#39;, &#39;Title&#39;],<br />colModel: [<br />{ name: &#39;Id&#39;, index: &#39;Id&#39;, width: 40, align: &#39;left&#39; },<br />{ name: &#39;Votes&#39;, index: &#39;Votes&#39;, width: 40, align: &#39;left&#39; },<br />{ name: &#39;Title&#39;, index: &#39;Title&#39;, width: 200, align: &#39;left&#39;}],<br />pager: jQuery(&#39;#pager&#39;),<br />rowNum: 10,<br />rowList: [5, 10, 20, 50],<br />sortname: &#39;Id&#39;,<br />sortorder: "desc",<br />viewrecords: true,<br />imgpath: &#39;/scripts/themes/coffee/images&#39;,<br />caption: &#39;My first grid&#39;<br />});<br />});&#160;<br />&#60;/script&#62;</p>
<p>&#60;h2&#62;jqGridTest&#60;/h2&#62;<br />&#60;table id="list" class="scroll" cellpadding="0" cellspacing="0"&#62;&#60;/table&#62;<br />&#60;div id="pager" class="scroll" style="text-align:center;"&#62;&#60;/div&#62;</p>
</p>
<hr />
<p>However, when the page renders all that is displayed is this: </p>
<hr />
<p>{"total":1,"page":null,"records":3,"rows":[{"id":1,"cell":["1","-7","Is this a good&#160;<br />question?"]},{"id":2,"cell":["2","15","Is this a blatant ripoff?"]},{"id":3,"cell":["3","23","Why is the sky blue?"]}]}</p>
<p>Being new to this technology, I&#39;m not too sure what I&#39;m doing wrong.</p>
<p>Thanks.</p>
<p>Doug</p>
]]></description>
        	        	<pubDate>Mon, 21 Mar 2011 17:27:10 +0200</pubDate>
        </item>
</channel>
</rss>