<?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: JQGrid not populating data</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-not-populating-data</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/discussion/jqgrid-not-populating-data/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>SamirG on JQGrid not populating data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-not-populating-data#p27298</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-not-populating-data#p27298</guid>
        	        	<description><![CDATA[<p>Hi ,</p>
<p>I am currently trying to implement JQGrid in an MVC 3 application using EF. And below is the code in my controller class.</p>
<p>public class HomeController : Controller<br />&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; CustomEntities _ce;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; List&#60;Record&#62; recData = new List&#60;Record&#62;();</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; public HomeController()<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _ce = new CustomEntities();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; public ActionResult Index()<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var gridModel = new RecordsJqGridModel();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var recordsGrid = gridModel.RecordsGrid;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; recordsGrid.ID = "Records";<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var context = new CustomEntities();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IQueryable&#60;Record&#62; data = context.Records;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridModel.RecordsGrid.DataSource = data;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridModel.RecordsGrid.DataBind();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return View(gridModel);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160; }</p>
</p>
<p>However the prob with the code is that, the grid is not populated with the data even though I can see the data while debugging the view.</p>
</p>
<p>Below is the code in the view,</p>
<p>&#60;body&#62;<br />&#160;&#160;&#160; &#60;div&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; @Html.Trirand().JQGrid(Model.RecordsGrid,"Records")<br />&#160;&#160;&#160; &#60;/div&#62;<br />&#60;/body&#62;</p>
</p>
<p>On the output page, i can only see a horizontal bar and nothing else.</p>
<p>Can anyone suggest what might have gone wrong with the code.</p>
<p>Thanks in advance.</p>
]]></description>
        	        	<pubDate>Tue, 11 Sep 2012 10:40:44 +0300</pubDate>
        </item>
</channel>
</rss>