<?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: Using jqGrid with IQueryable</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/using-jqgrid-with-iqueryable</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/using-jqgrid-with-iqueryable/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>sprugh@gmail.com on Using jqGrid with IQueryable</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-jqgrid-with-iqueryable#p19155</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-jqgrid-with-iqueryable#p19155</guid>
        	        	<description><![CDATA[<p>I am trialing jqGrid in ASP.Net&#160;MVC as a solution for editing 800 reference tables.&#160; This system doesn&#39;t warrant using&#160;LTS or EF&#160;and the maitenance would be burdensome.&#160;&#160;To minimize development effort,&#160;it is&#160;beneficial to be able to dynamically select the deisred table from a route: /TableViewer/TABLENAME</p>
</p>
<p>I&#39;m trying to get the data into the jqGrid, but have been unsuccessful.&#160; It appears that the grid cannot find the column by name and indicates this error: No property or field &#39;SYSTEM&#39; exists in type &#39;DataRow&#39;.&#160; In this case &#39;SYSTEM&#39; is a column that I confirmed does exist and had placed in the grid configuration.</p>
</p>
<p>Has anyone been able to use jqGrid ASP.Net mvc with an IQueryable&#60;DataRow&#62; ??&#160; Code is below.</p>
<p><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;">public</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> </span></span><span style="font-family: Consolas; color: #2b91af; font-size: x-small;"><span style="font-family: Consolas; color: #2b91af; font-size: x-small;"><span style="font-family: Consolas; color: #2b91af; font-size: x-small;">JsonResult</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> SearchGridDataRequested()</span></span></p>
<p>{</p>
</p>
<p><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;">string</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> tableName = Request.QueryString[</span></span><span style="font-family: Consolas; color: #a31515; font-size: x-small;"><span style="font-family: Consolas; color: #a31515; font-size: x-small;"><span style="font-family: Consolas; color: #a31515; font-size: x-small;">"tableName"</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">];</p>
<p></span></p>
<p></span></p>
<p><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;">var</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> model = </span></span><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;">new</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> Models.</span></span><span style="font-family: Consolas; color: #2b91af; font-size: x-small;"><span style="font-family: Consolas; color: #2b91af; font-size: x-small;"><span style="font-family: Consolas; color: #2b91af; font-size: x-small;">DynamicGridModel</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">();</span></span></p>
<p>model.Fill(tableName, 0, 100);</p>
<p>SetUpGrid(tableName, model.Grid);</p>
</p>
<p><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"></p>
<p></span></p>
<p></span></p>
<p><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;"><span style="font-family: Consolas; color: #0000ff; font-size: x-small;">return</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> model.Grid.DataBind(model.GridQueryable); // this fails with: No property or field &#39;SYSTEM&#39; exists in type &#39;DataRow&#39;</span></span></p>
<p>}</p></p>
]]></description>
        	        	<pubDate>Tue, 17 Aug 2010 06:44:04 +0300</pubDate>
        </item>
</channel>
</rss>