<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Using jqGrid with ASP.NET MVC: Introduction</title>
	<atom:link href="http://blogs.teamb.com/craigstuntz/2009/04/14/38200/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/</link>
	<description>C# • Delphi • Entity Framework • Functional Programming • InterBase • MVC • .NET • Web</description>
	<pubDate>Mon, 15 Mar 2010 01:07:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Hussain</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-12027</link>
		<dc:creator>Hussain</dc:creator>
		<pubDate>Fri, 27 Nov 2009 03:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-12027</guid>
		<description>If some body fine the solution of jqgrid plug in with asp.net 2.0 then please post the link from that i can see the demo or code to do the same thing</description>
		<content:encoded><![CDATA[<p>If some body fine the solution of jqgrid plug in with asp.net 2.0 then please post the link from that i can see the demo or code to do the same thing</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohan</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-11817</link>
		<dc:creator>Mohan</dc:creator>
		<pubDate>Fri, 20 Nov 2009 17:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-11817</guid>
		<description>Hi this is a great post for people new to MVC like me.
I do have a question though. 
I have an ajax form that posts some data and then after that is posted is it possible to load the jqgrid with a different json data?
Thanks
&lt;blockquote&gt;&lt;b&gt;Response:&lt;/b&gt; Can you elaborate on your question? I don't understand &lt;i&gt;precisely&lt;/i&gt; what you want to do.&lt;/blockquote&gt;

</description>
		<content:encoded><![CDATA[<p>Hi this is a great post for people new to MVC like me.<br />
I do have a question though.<br />
I have an ajax form that posts some data and then after that is posted is it possible to load the jqgrid with a different json data?<br />
Thanks</p>
<blockquote><p><b>Response:</b> Can you elaborate on your question? I don&#8217;t understand <i>precisely</i> what you want to do.</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: garry</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-11751</link>
		<dc:creator>garry</dc:creator>
		<pubDate>Tue, 17 Nov 2009 16:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-11751</guid>
		<description>does anyone know a webdeveloper that can add contributions to old asp sites my head is hurting trying to find a solution to adding a feed to an old asp site.</description>
		<content:encoded><![CDATA[<p>does anyone know a webdeveloper that can add contributions to old asp sites my head is hurting trying to find a solution to adding a feed to an old asp site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cinthy</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-10367</link>
		<dc:creator>Cinthy</dc:creator>
		<pubDate>Fri, 23 Oct 2009 13:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-10367</guid>
		<description>Hi Craig,

Can you show some demos of using jqGrid (subgrid) with asp.net MVC? It will help us to proceed.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Craig,</p>
<p>Can you show some demos of using jqGrid (subgrid) with asp.net MVC? It will help us to proceed.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cinthy</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-10366</link>
		<dc:creator>Cinthy</dc:creator>
		<pubDate>Fri, 23 Oct 2009 12:59:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-10366</guid>
		<description>Hi Craig, 

Am newbie to MVC and JQuery, can you please tell me how to develop subgrid using jquery in MVC, am totally new to this, please  help in developing this. I need to plement the same.</description>
		<content:encoded><![CDATA[<p>Hi Craig, </p>
<p>Am newbie to MVC and JQuery, can you please tell me how to develop subgrid using jquery in MVC, am totally new to this, please  help in developing this. I need to plement the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Stuntz</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-10283</link>
		<dc:creator>Craig Stuntz</dc:creator>
		<pubDate>Mon, 19 Oct 2009 11:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-10283</guid>
		<description>Phillip: I've already discussed date formatting in &lt;a href="http://blogs.teamb.com/craigstuntz/2009/04/27/38243/" rel="nofollow"&gt;this post&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Phillip: I&#8217;ve already discussed date formatting in <a href="http://blogs.teamb.com/craigstuntz/2009/04/27/38243/" rel="nofollow">this post</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phillip Monk</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-10282</link>
		<dc:creator>Phillip Monk</dc:creator>
		<pubDate>Mon, 19 Oct 2009 11:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-10282</guid>
		<description>Hello can you help me out here i am new to asp.net and wanted to know more on formatting date columns when you posting and could you email me any more info please my brain hurts and need a simple path to follow or top blog like the one here.</description>
		<content:encoded><![CDATA[<p>Hello can you help me out here i am new to asp.net and wanted to know more on formatting date columns when you posting and could you email me any more info please my brain hurts and need a simple path to follow or top blog like the one here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Stuntz</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-7691</link>
		<dc:creator>Craig Stuntz</dc:creator>
		<pubDate>Tue, 16 Jun 2009 10:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-7691</guid>
		<description>To return JSON without using MVC, use the JavaScriptSerializer type:

&lt;code&gt;                // The JavaScriptSerializer type was marked as obsolete prior to .NET Framework 3.5 SP1
#pragma warning disable 0618
                JavaScriptSerializer serializer = new JavaScriptSerializer();
                response.Write(serializer.Serialize(Data));
#pragma warning restore 0618&lt;/code&gt;

Better still, just use MVC. :)</description>
		<content:encoded><![CDATA[<p>To return JSON without using MVC, use the JavaScriptSerializer type:</p>
<p><code>                // The JavaScriptSerializer type was marked as obsolete prior to .NET Framework 3.5 SP1<br />
#pragma warning disable 0618<br />
                JavaScriptSerializer serializer = new JavaScriptSerializer();<br />
                response.Write(serializer.Serialize(Data));<br />
#pragma warning restore 0618</code></p>
<p>Better still, just use MVC. <img src='http://blogs.teamb.com/craigstuntz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gprabhakaran</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-7687</link>
		<dc:creator>gprabhakaran</dc:creator>
		<pubDate>Tue, 16 Jun 2009 09:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-7687</guid>
		<description>Hi James:

Below is my code, I need to return the result as JSON, Please let me know how to do this.

Note: I am not using the asp.net mvc

        public string GetUsers(string sidx, string sord, int page, int rows)
        {
            int pageIndex = Convert.ToInt32(page) - 1;
            int pageSize = 10;
            int totalRecords = Context.Users.Count();
            int totalPages = (int)Math.Ceiling((float)totalRecords / (float)pageSize);

          
           var users = Context.Users.Skip(pageIndex * pageSize).Take(pageSize);


           var jsonData = new
           {
               total = totalPages,
               page = page,
               records = totalRecords,
               rows = (
               from user in users
               select new
               {
                   i = user.Pk,
                   cell = new string[] { user.Pk.ToString(), user.FullName.ToString(), user.Email.ToString() }

               }).ToArray()
           };

           return jsonData.ToString();                  
           
        }

sample output : to fit in JQGrid.
{"page":"1","total":2,"records":"13","rows":[{"id":"13","cell":["13","2007-10-06","Client 3","1000.00","0.00","1000.00",null]},{"id":"12","cell":["12","2007-10-06","Client 2","700.00","140.00","840.00",null
]},{"id":"11","cell":["11","2007-10-06","Client 1","600.00","120.00","720.00",null]},{"id":"10","cell"
:["10","2007-10-06","Client 2","100.00","20.00","120.00",null]},{"id":"9","cell":["9","2007-10-06","Client
 1","200.00","40.00","240.00",null]},{"id":"8","cell":["8","2007-10-06","Client 3","200.00","0.00","200
.00",null]},{"id":"7","cell":["7","2007-10-05","Client 2","120.00","12.00","134.00",null]},{"id":"6"
,"cell":["6","2007-10-05","Client 1","50.00","10.00","60.00",null]},{"id":"5","cell":["5","2007-10-05"
,"Client 3","100.00","0.00","100.00","no tax"]},{"id":"4","cell":["4","2007-10-04","Client 3","150.00"
,"0.00","150.00","no tax"]}]}</description>
		<content:encoded><![CDATA[<p>Hi James:</p>
<p>Below is my code, I need to return the result as JSON, Please let me know how to do this.</p>
<p>Note: I am not using the asp.net mvc</p>
<p>        public string GetUsers(string sidx, string sord, int page, int rows)<br />
        {<br />
            int pageIndex = Convert.ToInt32(page) - 1;<br />
            int pageSize = 10;<br />
            int totalRecords = Context.Users.Count();<br />
            int totalPages = (int)Math.Ceiling((float)totalRecords / (float)pageSize);</p>
<p>           var users = Context.Users.Skip(pageIndex * pageSize).Take(pageSize);</p>
<p>           var jsonData = new<br />
           {<br />
               total = totalPages,<br />
               page = page,<br />
               records = totalRecords,<br />
               rows = (<br />
               from user in users<br />
               select new<br />
               {<br />
                   i = user.Pk,<br />
                   cell = new string[] { user.Pk.ToString(), user.FullName.ToString(), user.Email.ToString() }</p>
<p>               }).ToArray()<br />
           };</p>
<p>           return jsonData.ToString();                  </p>
<p>        }</p>
<p>sample output : to fit in JQGrid.<br />
{"page":"1","total":2,"records":"13","rows":[{"id":"13","cell":["13","2007-10-06","Client 3","1000.00","0.00","1000.00",null]},{"id":"12","cell":["12","2007-10-06","Client 2","700.00","140.00","840.00",null<br />
]},{"id":"11","cell":["11","2007-10-06","Client 1","600.00","120.00","720.00",null]},{"id":"10","cell"<br />
:["10","2007-10-06","Client 2","100.00","20.00","120.00",null]},{"id":"9","cell":["9","2007-10-06","Client<br />
 1","200.00","40.00","240.00",null]},{"id":"8","cell":["8","2007-10-06","Client 3","200.00","0.00","200<br />
.00",null]},{"id":"7","cell":["7","2007-10-05","Client 2","120.00","12.00","134.00",null]},{"id":"6"<br />
,"cell":["6","2007-10-05","Client 1","50.00","10.00","60.00",null]},{"id":"5","cell":["5","2007-10-05"<br />
,"Client 3","100.00","0.00","100.00","no tax"]},{"id":"4","cell":["4","2007-10-04","Client 3","150.00"<br />
,"0.00","150.00","no tax"]}]}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam1980s</title>
		<link>http://blogs.teamb.com/craigstuntz/2009/04/14/38200/#comment-6903</link>
		<dc:creator>Sam1980s</dc:creator>
		<pubDate>Fri, 22 May 2009 04:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/craigstuntz/?p=38200#comment-6903</guid>
		<description>Hi,

I checked and found out the solution this artical provides contains method signature as below.

public ActionResult GridData(string sidx, string sord, string search, int page, int rows)

But in the default JQGrid the method signature is only


public ActionResult GridData(string sidx, string sord, int page, int rows)

Can anybody please help me understanding where we need to make changes to pass the search criterias in the ActionResult as method parameters rather then the request objects.

Regards,

Sam</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I checked and found out the solution this artical provides contains method signature as below.</p>
<p>public ActionResult GridData(string sidx, string sord, string search, int page, int rows)</p>
<p>But in the default JQGrid the method signature is only</p>
<p>public ActionResult GridData(string sidx, string sord, int page, int rows)</p>
<p>Can anybody please help me understanding where we need to make changes to pass the search criterias in the ActionResult as method parameters rather then the request objects.</p>
<p>Regards,</p>
<p>Sam</p>
]]></content:encoded>
	</item>
</channel>
</rss>
