<?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: Data Loading issue while calling serverside method</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/data-loading-issue-while-calling-serverside-method</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/data-loading-issue-while-calling-serverside-method/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>dineshsharmain on Data Loading issue while calling serverside method</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/data-loading-issue-while-calling-serverside-method#p23718</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/data-loading-issue-while-calling-serverside-method#p23718</guid>
        	        	<description><![CDATA[<p>Hi</p>
<p>Below is my JQuery code, I want to make a server call like simple jquery post method but it doesn&#39;t call server methods&#160;&#160;</p>
<p><span style="font-family: Consolas; font-size: x-small;"><strong>JQuery Code - </strong></span></p>
<p><input type='button' class='sfcodeselect' name='sfselectit1360' value='Select Code' data-codeid='sfcode1360' /></p>
<div class='sfcode' id='sfcode1360'>
<p>jQuery(&#34;#jqgajax&#34;).jqGrid({</p>
<p>ajaxGridOptions: { type: &#34;POST&#34; },</p>
<p>serializeGridData: function (postdata) {</p>
<p>postdata.page = 1;</p>
<p>return postdata;</p>
<p>},</p>
<p>contentType: &#34;application/json; charset=utf-8&#34;,</p>
<p>url: &#34;gridData.aspx/GetData&#34;,</p>
<p>datatype: &#34;json&#34;,</p>
<p>colNames: [&#39;Part Id&#39;, &#39;Part Number&#39;, &#39;Description&#39;, &#39;Part Category&#39;, &#39;LOB Id&#39;],</p>
<p>colModel: [</p>
<p>{ name: &#39;PartId&#39;, index: &#39;PartId&#39;, width: 55 },</p>
<p>{ name: &#39;PartNumber&#39;, index: &#39;PartNumber&#39;, width: 90 },</p>
<p>{ name: &#39;PartDescription&#39;, index: &#39;PartDescription asc&#39;, width: 100 },</p>
<p>{ name: &#39;PartCategoryId&#39;, index: &#39;PartCategoryId&#39;, width: 80, align: &#34;right&#34; },</p>
<p>{ name: &#39;LOBId&#39;, index: &#39;LOBId&#39;, width: 80, align: &#34;right&#34; }</p>
</p>
<p>],</p>
<p>rowNum: 10,</p>
<p>width: 700,</p>
<p>rowList: [10, 20, 30],</p>
<p>pager: &#39;#pjqgajax&#39;,</p>
<p>sortname: &#39;PartNumber&#39;,</p>
<p>viewrecords: true,</p>
<p>sortorder: &#34;desc&#34;,</p>
<p>caption: &#34;Parts Details&#34;</p>
<p>});</p>
<p>jQuery(&#34;#pjqgajax&#34;).jqGrid(&#39;navGrid&#39;,&#39;#pjqgajax&#39;,{edit:false,add:false,del:false});</p>
</div>
<p><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"><strong>C# Code(File Name &#39;gridData.aspx&#39;) &#8211; Not being called</strong></span></span></p>
<p><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"></span></span></p>
<p><input type='button' class='sfcodeselect' name='sfselectit624' value='Select Code' data-codeid='sfcode624' /></p>
<div class='sfcode' id='sfcode624'><span style=&#34;font-family: Consolas; font-size: x-small;&#34;><span style=&#34;font-family: Consolas; font-size: x-small;&#34;></p>
<p>[WebMethod]</p>
<p>public static string GetData()</p>
<p>{</p>
<p>// Create a new Sql Connection and set connection string accordingly</p>
<p>SqlConnection sqlConnection = new SqlConnection();</p>
<p>sqlConnection.ConnectionString = &#34;initial catalog=kaizen;data source=.;uid=realm;integrated security=SSPI&#34;;</p>
<p>sqlConnection.Open();</p>
<p>string sqlStatement = &#34;select PartId, PartNumber, PartDescription, PartCategoryId, LOBId from partsdetails&#34;;</p>
<p>SqlCommand cmd = new SqlCommand(sqlStatement, sqlConnection);</p>
<p>DataTable dtResult = new DataTable();</p>
<p>SqlDataAdapter adp=new SqlDataAdapter(cmd);</p>
<p>adp.Fill(dtResult);</p>
<p>return GetJSONString(dtResult);</p>
<p>}</p>
</p>
<p></span></span></div></p>
]]></description>
        	        	<pubDate>Tue, 21 Jun 2011 19:26:32 +0300</pubDate>
        </item>
</channel>
</rss>