<?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: Please help me with paramters passing to asp.net for id</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id</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/please-help-me-with-paramters-passing-to-asp-net-for-id/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>12seconds on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29516</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29516</guid>
        	        	<description><![CDATA[</p>
<p>Spent 20 mins on this so... Ill keep it simple.<br />I am using ajax with handler approach rather than using ajax and webservice which you can do to achieve the same result.&#160;</p>
<p>HTML</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9466' value='Select Code' data-codeid='sfcode9466' /></p>
<div class='sfcode' id='sfcode9466'>&#60;body&#62;<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>&#60;form id=&#34;form1&#34; runat=&#34;server&#34;&#62;&#160; &#160; &#160;<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>&#60;div&#62; &#160;&#160;&#160; &#160;<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>&#60;table id=&#34;grid&#34;&#62;&#60;/table&#62;&#160; &#160; &#160; &#160;&#160;<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>&#60;asp:Label ID=&#34;lblID&#34; runat=&#34;server&#34;&#62;&#60;/asp:Label&#62; <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>&#60;/div&#62;<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>&#60;/form&#62;&#160;<br />&#60;/body&#62;&#160;</div>
</p>
<p>JAVASCRIPT Below Body&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2655' value='Select Code' data-codeid='sfcode2655' /></p>
<div class='sfcode' id='sfcode2655'>&#60;script&#62;<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>var data = [[1, &#34;Hello&#34;], [2, &#34;World&#34;]];<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>$(&#34;#grid&#34;).jqGrid({<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>datatype: &#34;local&#34;,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>height: 250,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>colNames: [&#39;ID&#39;, &#39;Name&#39;],<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>colModel: [{<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>name: &#39;id&#39;,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>index: &#39;id&#39;,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>width: 60,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>sorttype: &#34;int&#34;},<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>{name: &#39;name&#39;,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>index: &#39;name&#39;,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>width: 90,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>sorttype: &#34;string&#34;}],<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>caption: &#34;example&#34;,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>viewrecords: &#39;true&#39;,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>onSelectRow: function (id) {<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>var IDLabel = document.getElementById(&#39;&#60;%= lblID.ClientID %&#62;&#39;);<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>$.ajax({<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>url: &#34;Handler.ashx?id=&#34; + id,<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>success: function (result) {<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>IDLabel.innerHTML= result;<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>}<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>});<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>},<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>});<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>var names = [&#34;id&#34;, &#34;name&#34;];<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>var mydata = [];<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>for (var i = 0; i &#60; data.length; i++) {<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>mydata[i] = {};<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>for (var j = 0; j &#60; data[i].length; j++) {<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>mydata[i][names[j]] = data[i][j];<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>}<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>}<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>for (var i = 0; i &#60;= mydata.length; i++) {<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>$(&#34;#grid&#34;).jqGrid(&#39;addRowData&#39;, i + 1, mydata[i]);<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>}<br />&#60;/script&#62;</div>
<p>ASHX Hander.ashx</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6802' value='Select Code' data-codeid='sfcode6802' /></p>
<div class='sfcode' id='sfcode6802'>&#60;%@ WebHandler Language=&#34;C#&#34; Class=&#34;Handler&#34; %&#62; <br /> using System; <br />using System.Web; </p>
<p>public class Handler : IHttpHandler <br />{ <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>public void ProcessRequest(HttpContext context) <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>{ <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>string id = &#34;&#34;; <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>if (context.Request.QueryString[&#34;id&#34;] != null) <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>{ <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>id = (context.Request.QueryString[&#34;id&#34;]).ToString(); <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>} <br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>context.Response.Write(id);<br /><span style=&#34;&#34;white-space:pre&#34;&#34;> </span>} <br /><span style=&#34;&#34;white-space:pre&#34;&#34;><br /> </span>public bool IsReusable     {         get         {             return false;         }     } <br />}</p>
</div>
<p>That&#39;s it! Label text should change based on your row ID</p>
<p>Cheers</p></p>
]]></description>
        	        	<pubDate>Sat, 21 Sep 2013 09:33:18 +0300</pubDate>
        </item>
        <item>
        	<title>jqgrealynasty on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29515</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29515</guid>
        	        	<description><![CDATA[<p>Please can you give me more details, I&#39;m a novice in web techs, is it like what Tony said on his first post for ajax:</p>
<p>onSelectRow : function (id) {</p>
<p>&#160;&#160; $.ajax({</p>
<p>&#160;&#160;&#160;&#160;&#160; url: "Default&#8230;..?id="+id,</p>
<p>&#160;&#160;&#160;&#160;&#160; success : function(response) {&#8230;}</p>
<p>&#8230;</p>
<p>&#160;&#160; }</p>
<p>}</p>
<p>which method is the more reliable and simpler ajax or web service, and can you please give me an example or some guide?</p>
]]></description>
        	        	<pubDate>Sat, 21 Sep 2013 06:39:51 +0300</pubDate>
        </item>
        <item>
        	<title>12seconds on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29514</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29514</guid>
        	        	<description><![CDATA[<p>Hi,<br />Right, Reponse.Write cannot be used since no postback is done...</p>
<p>Since jqgrid doesn&#39;t postback to the server.. One option is to use ajax with code handler, or web service.</p>
<p>As for the javascript,</p>
<p>Whenever onSelectRow is called in jqgrid you assigned the ID to the hiddenfield. You don&#39;t have to use HiddenField, if you dont know about them you can just use a label and hide it.</p>
<p>However, if you do want to learn more about HiddenField, I suggest you to have a look into MSDN Library.<br /><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hiddenfield.aspx&#038;nbsp" rel="nofollow" target="_blank"><a href="http://msdn.microsoft.com/en-u" rel="nofollow">http://msdn.microsoft.com/en-u</a>.....&#038;nbsp</a>;</p>
]]></description>
        	        	<pubDate>Sat, 21 Sep 2013 01:54:11 +0300</pubDate>
        </item>
        <item>
        	<title>jqgrealynasty on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29511</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29511</guid>
        	        	<description><![CDATA[<p>Yes, at all cases on the link only show "localhost/website/Default5.aspx" and I do not know how</p>
<p>the paramters for the grid are passed and retrieved by Response.QueryString like select, row, sord, sidx</p>
<p>of what the jqgrid needs to make response back of Json data format for the grid while adding id</p>
<p>and que parameters are not detected.&#160; I might did Not know how to use the hidden field, please can you</p>
<p>give me more details on it?? I did not understand your JS part, how to assign the selected row id</p>
<p>to the hidden field within onSelectedRow property? The grid does interact and get the id on selection</p>
<p>but what is :</p>
<pre class="lang-cs prettyprint prettyprinted">hfjqGridID.ClientID<br /> all what I want is on selection I display an image related to that selected row on the same page.<br /><br />I see the grid when I select a row/field it does not refresh or initiate postback on the page so<br />how when you write into the response stream the value of hidden field how to get the that value<br />back???? <br />Response.Write(hfjqGridID.Value);????</pre>
]]></description>
        	        	<pubDate>Fri, 20 Sep 2013 09:04:42 +0300</pubDate>
        </item>
        <item>
        	<title>12seconds on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29510</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29510</guid>
        	        	<description><![CDATA[<p>Hi,&#160;</p>
<p>If your url is only = "localhost/website/Default5.aspx"... You cannot use Request.QueryString to retrieve the id...</p>
<p>May I ask how you did your hidden field?&#160;</p>
<p>But anywho here&#39;s a snippet how you would do a hidden field:</p>
<pre class="lang-cs prettyprint prettyprinted"><p><input type='button' class='sfcodeselect' name='sfselectit2859' value='Select Code' data-codeid='sfcode2859' /></p><div class='sfcode' id='sfcode2859'><p><input type='button' class='sfcodeselect' name='sfselectit4163' value='Select Code' data-codeid='sfcode4163' /></p><div class='sfcode' id='sfcode4163'>&#60;asp:HiddenField ID=&#34;hfjqGridID&#34; runat=&#34;server&#34; /&#62;</div></div></pre>
<pre class="lang-cs prettyprint prettyprinted"><p><input type='button' class='sfcodeselect' name='sfselectit3573' value='Select Code' data-codeid='sfcode3573' /></p><div class='sfcode' id='sfcode3573'><br />On Javascript:<p><input type='button' class='sfcodeselect' name='sfselectit3582' value='Select Code' data-codeid='sfcode3582' /></p><div class='sfcode' id='sfcode3582'>var val = document.getElementById(&#39;&#60;%= hfjqGridID.ClientID %&#62;&#39;);            &#160;</div><p><input type='button' class='sfcodeselect' name='sfselectit8898' value='Select Code' data-codeid='sfcode8898' /></p><div class='sfcode' id='sfcode8898'>val.value = id;</div><p><input type='button' class='sfcodeselect' name='sfselectit9987' value='Select Code' data-codeid='sfcode9987' /></p><div class='sfcode' id='sfcode9987'>//Add this line to test out if your ID is being passed in correctly.</div><p><input type='button' class='sfcodeselect' name='sfselectit3100' value='Select Code' data-codeid='sfcode3100' /></p><div class='sfcode' id='sfcode3100'>alert(val.value);</div><br />Once you have that you can see if your server side can read the value on PageLoad</div></pre>
<pre class="lang-cs prettyprint prettyprinted"><span style="font-family: monospace;"><p><input type='button' class='sfcodeselect' name='sfselectit2301' value='Select Code' data-codeid='sfcode2301' /></p><div class='sfcode' id='sfcode2301'><pre class=&#34;lang-cs prettyprint prettyprinted&#34;><p><input type='button' class='sfcodeselect' name='sfselectit4007' value='Select Code' data-codeid='sfcode4007' /></p><div class='sfcode' id='sfcode4007'>if(!isPostBack)<br />{</div></pre>
<pre class=&#34;lang-cs prettyprint prettyprinted&#34;><p><input type='button' class='sfcodeselect' name='sfselectit1524' value='Select Code' data-codeid='sfcode1524' /></p><div class='sfcode' id='sfcode1524'><span style=&#34;white-space: pre;&#34;>	</span>Response.Write(hfjqGridID.Value);<br />}&#160;</div></pre>
</div>
<p>Cheers</p>
<p></span></p>
<pre class="lang-cs prettyprint prettyprinted"><p><input type='button' class='sfcodeselect' name='sfselectit4105' value='Select Code' data-codeid='sfcode4105' /></p><div class='sfcode' id='sfcode4105'><br /><br /></div></pre>
]]></description>
        	        	<pubDate>Fri, 20 Sep 2013 08:00:04 +0300</pubDate>
        </item>
        <item>
        	<title>jqgrealynasty on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29509</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29509</guid>
        	        	<description><![CDATA[<blockquote>
<p>12seconds said:</p>
<p>Hi,</p>
<p>Is your javascript doing a post back when you select a field on the jqgrid? So the link will be something similar:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4068' value='Select Code' data-codeid='sfcode4068' /></p>
<div class='sfcode' id='sfcode4068'>localhost:port/Default.aspx?cmd=select&#38;que=0&#38;id=123</div>
<p>Where 123 is the ID selected in the jqgrid.</p>
<p><span style="color: #008080;">If you talk about the url address on the webpage of the browser on top. No. It shows only the </span></p>
<p><span style="color: #008080;">name of the page "like localhost/website/Default5.aspx", I feel that JqGrid does not refresh</span></p>
<p><span style="color: #008080;">entire page, I have setup Firbug (A utility shows what actually posted by the script to the </span></p>
<p><span style="color: #008080;">page) When I first load the grid I get on the param section the following:</span></p>
<p><span style="color: #ff6600;"><a href="http://localhost/webpage/Default5.aspx?cmd=select&#038;que=1&#038;_search=false&#038;nd=" rel="nofollow" target="_blank"><a href="http://localhost/webpage/Defau" rel="nofollow">http://localhost/webpage/Defau</a>.....e&#038;nd=</a></span></p>
<p><span style="color: #ff6600;">1379651648678&#38;rows=10&#38;page=1&#38;sidx=id&#38;sord=asc&#39; (This does not show on the </span></p>
<p><span style="color: #ff6600;">browser URL as I stated)<br /></span></p>
<blockquote>
<p>and paramtered shown that suppose to be posted:</p>
</blockquote>
<blockquote>
<table class="netInfoParamsText netInfoText netInfoParamsTable " style="height: 136px;" border="0" cellspacing="0" cellpadding="0" width="231">
<tbody class=" ">
<tr class=" ">
<td class="netInfoParamName ">_search</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit8576' value='Select Code' data-codeid='sfcode8576' /></p>
<div class='sfcode' id='sfcode8576'>false</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">cmd</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit3433' value='Select Code' data-codeid='sfcode3433' /></p>
<div class='sfcode' id='sfcode3433'>select</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">nd</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit6285' value='Select Code' data-codeid='sfcode6285' /></p>
<div class='sfcode' id='sfcode6285'>1379651648678</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">page</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit8494' value='Select Code' data-codeid='sfcode8494' /></p>
<div class='sfcode' id='sfcode8494'>1</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">que</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit2812' value='Select Code' data-codeid='sfcode2812' /></p>
<div class='sfcode' id='sfcode2812'>1</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">rows</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit1447' value='Select Code' data-codeid='sfcode1447' /></p>
<div class='sfcode' id='sfcode1447'>10</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">sidx</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit5938' value='Select Code' data-codeid='sfcode5938' /></p>
<div class='sfcode' id='sfcode5938'>id</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">sord</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit5472' value='Select Code' data-codeid='sfcode5472' /></p>
<div class='sfcode' id='sfcode5472'>asc</div>
</td>
</tr>
</tbody>
</table>
</blockquote>
<p>While if I click on a field on the grid data (Say row with id 17) I get the following paramters shown:</p>
<table class="netInfoParamsText netInfoText netInfoParamsTable " style="height: 136px;" border="0" cellspacing="0" cellpadding="0" width="168">
<tbody class=" ">
<tr class=" ">
<td class="netInfoParamName ">cmd</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit8420' value='Select Code' data-codeid='sfcode8420' /></p>
<div class='sfcode' id='sfcode8420'>select</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">id</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit8602' value='Select Code' data-codeid='sfcode8602' /></p>
<div class='sfcode' id='sfcode8602'>17</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">page</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit5876' value='Select Code' data-codeid='sfcode5876' /></p>
<div class='sfcode' id='sfcode5876'>1</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">que</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit7705' value='Select Code' data-codeid='sfcode7705' /></p>
<div class='sfcode' id='sfcode7705'>1</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">rows</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit3427' value='Select Code' data-codeid='sfcode3427' /></p>
<div class='sfcode' id='sfcode3427'>10</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">search</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit2086' value='Select Code' data-codeid='sfcode2086' /></p>
<div class='sfcode' id='sfcode2086'>false</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">sidx</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit5026' value='Select Code' data-codeid='sfcode5026' /></p>
<div class='sfcode' id='sfcode5026'>id</div>
</td>
</tr>
<tr class=" ">
<td class="netInfoParamName ">sord</td>
<td class="netInfoParamValue ">
<p><input type='button' class='sfcodeselect' name='sfselectit7582' value='Select Code' data-codeid='sfcode7582' /></p>
<div class='sfcode' id='sfcode7582'>asc</div>
</td>
</tr>
</tbody>
</table>
<p>If that link is displaying and working correctly then you can use querystring on your pageload:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1551' value='Select Code' data-codeid='sfcode1551' /></p>
<div class='sfcode' id='sfcode1551'>
<p>if(!IsPostBack)&#160;</p>
<p>{</p>
<p>if(Page.Request.QueryString[&#34;id&#34;] != string.Empty &#124;&#124; Page.Request.QueryString[&#34;id&#34;] != null)</p>
<p>{</p>
<p>ltl2.Text = &#34;Selecting: &#34; +&#160;Page.Request.QueryString[&#34;id&#34;].ToString();</p>
<p>}<br />}&#160;</p>
</div>
<p>My suggestion for you is to make a hidden field and pass the ID to that hidden field.</p>
<p>That way it won&#39;t cause post back every time you make a selection...</p>
</blockquote>
<blockquote>
<p><span style="color: #008080;">I have made a hidden field but the value of id is always null, I tried in desperate of thinking </span></p>
</blockquote>
<blockquote>
<p><span style="color: #008080;">why, I made the call to a different page when I do select row in the onselectrow property </span></p>
</blockquote>
<blockquote>
<p><span style="color: #008080;">and I made a Global variable on the website so that all pages see it and I have on the </span></p>
</blockquote>
<blockquote>
<p><span style="color: #008080;">calling/main page setting the value of the id to a asp label and the label does not</span></p>
</blockquote>
<blockquote>
<p><span style="color: #008080;">have the id posted only when I click icon of reload the entire page. I wish if I could </span></p>
</blockquote>
<blockquote>
<p><span style="color: #008080;">send the testing webpage to someone&#160; to understand what I mean and test it.</span></p>
</blockquote>
<blockquote>
<p><span style="color: #008080;"><br /></span></p>
</blockquote>
<hr />
]]></description>
        	        	<pubDate>Fri, 20 Sep 2013 07:47:23 +0300</pubDate>
        </item>
        <item>
        	<title>12seconds on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29508</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29508</guid>
        	        	<description><![CDATA[</p>
<p>Hi,</p>
<p>Is your javascript doing a post back when you select a field on the jqgrid? So the link will be something similar:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7582' value='Select Code' data-codeid='sfcode7582' /></p>
<div class='sfcode' id='sfcode7582'>localhost:port/Default.aspx?cmd=select&#38;que=0&#38;id=123</div>
<p>Where 123 is the ID selected in the jqgrid.</p>
<p>If that link is displaying and working correctly then you can use querystring on your pageload:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4384' value='Select Code' data-codeid='sfcode4384' /></p>
<div class='sfcode' id='sfcode4384'>
<p>if(!IsPostBack)&#160;</p>
<p>{</p>
<p><span style=&#34;white-space: pre;&#34;> </span>if(Page.Request.QueryString[&#34;id&#34;] != string.Empty &#124;&#124; Page.Request.QueryString[&#34;id&#34;] != null)</p>
<p><span style=&#34;white-space: pre;&#34;> </span>{</p>
<p><span style=&#34;white-space: pre;&#34;> </span>ltl2.Text = &#34;Selecting: &#34; +&#160;Page.Request.QueryString[&#34;id&#34;].ToString();</p>
<p><span style=&#34;white-space: pre;&#34;> </span>}<br />}&#160;</p>
</div>
<p>My suggestion for you is to make a hidden field and pass the ID to that hidden field.</p>
<p>That way it won&#39;t cause post back every time you make a selection...</p>
]]></description>
        	        	<pubDate>Fri, 20 Sep 2013 07:19:07 +0300</pubDate>
        </item>
        <item>
        	<title>jqgrealynasty on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29506</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29506</guid>
        	        	<description><![CDATA[<blockquote>
<p>tony Hello,</p>
</blockquote>
<blockquote>
<p>Following your suggestion:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4311' value='Select Code' data-codeid='sfcode4311' /></p>
<div class='sfcode' id='sfcode4311'>onSelectRow: function (id) {<br />//var treedata = $(&#34;#htmlTable5&#34;).jqGrid(&#39;getRowData&#39;, id);<br />var selr = jQuery(&#39;#htmlTable5&#39;).jqGrid(&#39;getGridParam&#39;, &#39;selrow&#39;);<br />//var value = $(&#39;#htmlTable5&#39;).jqGrid(&#39;getCell&#39;, sel_id, &#39;_id&#39;);<br />//alert(&#39;Selected row ID &#39; + id);<br />id = selr;<br />$(&#34;#htmlTable5&#34;).jqGrid(&#39;setGridParam&#39;, {postData: {id:id}, mtype: &#39;POST&#39;});<br />$.ajax({<br />url: &#39;GetData.aspx?cmd=select&#38;que=1&#38;search=false&#38;rows=10&#38;page=1&#38;sidx=id&#38;sord=asc&#38;id=&#39; + id,<br />success : function(response) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;});</div>
<p>I could see same results but I simply could not detect if id is actually sent and not null</p>
</blockquote>
<blockquote>
<p>I use the following on the Page_load function to detect if id is not null then a label on</p>
</blockquote>
<blockquote>
<p>the same page should displaythe selected id like (I do see and veriy through Firebug</p>
</blockquote>
<blockquote>
<p>utility the parameters of id is set correctly after selection and&#160; exists):</p>
</blockquote>
<p><input type='button' class='sfcodeselect' name='sfselectit1744' value='Select Code' data-codeid='sfcode1744' /></p>
<div class='sfcode' id='sfcode1744'>
<blockquote>
<p>&#160;if (Request[&#34;id&#34;] != null)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ltl2.Text = &#34;Selecting: &#34; + Request.QueryString[&#34;id&#34;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</blockquote>
<blockquote>
<p>OR</p>
</blockquote>
<blockquote>
<p>if (Request.QueryString[&#34;id&#34;] != null)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ltl2.Text = &#34;Sel = &#34; + Request.QueryString[&#34;id&#34;].ToString();</p>
</blockquote>
</div>
<p>but nothing on the page.<img class="spSmiley" style="margin:0" title="Frown" src="/blog/wp-content/forum-smileys/sf-frown.gif" alt="Frown" /> I tried to use Global variable on the web site and set it with the</p>
<p>selected id and when I refresh the page I do see the result on the page, this means, it does</p>
<p>detect posted id but how to force grid to refresh the entire page to show the result?? may</p>
<p>I send you to your email the testing code?? I appreciate your kind help.</p>
]]></description>
        	        	<pubDate>Thu, 19 Sep 2013 21:57:46 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29498</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29498</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Sorry, but I can not tell you why is this.</p>
<p>I&#39;m not familiar with ASP C#and etc.</p>
<p>For me the there are some unsual thing.</p>
</p>
<p>1. When the row is selected you set new url and reload the grid. This will happen every time a row is selected.</p>
<p>Why do you not use this url by default.</p>
<p>2. You can use only one url and use postData to send a parameters to the server.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7857' value='Select Code' data-codeid='sfcode7857' /></p>
<div class='sfcode' id='sfcode7857'>
<p>jqGrid(&#39;setGridParam&#39;, { postData: { id:id, ...}});</p>
</div>
<p>The simple test case for me is</p>
<p>in a onSelectRow event do not use any grid code - just pur ajax and try to obtain the id like this</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7793' value='Select Code' data-codeid='sfcode7793' /></p>
<div class='sfcode' id='sfcode7793'>
<p>onSelectRow : function (id) {</p>
<p>&#160;&#160; $.ajax({</p>
<p>&#160;&#160;&#160;&#160;&#160; url: "Default.....?id="+id,</p>
<p>&#160;&#160;&#160;&#160;&#160; success : function(response) {...}</p>
<p>...</p>
<p>&#160;&#160; }</p>
<p>}</p>
</div>
<p>and see if the parameter is send.</p>
<p>I hope you got the point.</p>
</p>
<p>Kind Regards,</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 19 Sep 2013 12:04:07 +0300</pubDate>
        </item>
        <item>
        	<title>jqgrealynasty on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29495</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29495</guid>
        	        	<description><![CDATA[<p><span style="color: #008000;">Thank you Tony for the msg. Here I rewrite what the issue is: When I click to select a row on the jqgrid it does</span></p>
<p><span style="color: #008000;"> not send the selected row id field. In other word, for some reason that I cannot retrieve the id on the backend </span></p>
<p><span style="color: #008000;">C# code of the page that displays the grid.</span></p>
<p><span style="color: #008000;">Using Resquest.QueryString["id"] / Resquest.QueryString["que"] per my posted code above is always null, tried</span></p>
<p><span style="color: #008000;"> to use post/get methods and still I cannot retrieve the id of selected row, even though I could see the grid </span></p>
<p><span style="color: #008000;">respond to my selection by showing the selected row id on the Caption of the grid, in addition that I could </span></p>
<p><span style="color: #008000;">trace using firebug utility that a response with parameters showing</span></p>
<p><span style="color: #008000;">que=1 and id=x.</span></p>
<p><span style="color: #0000ff;">Some info about the grid: the grid uses above JS code on the header of Default.aspx page</span></p>
<p><span style="color: #0000ff;">and Resquest.QueryString["id"] / Resquest.QueryString["que"] is used in the Page_Load section code of</span></p>
<p><span style="color: #0000ff;">same page (Default.aspx.cs).</span></p>
<p><span style="color: #0000ff;">I do not know why cmd=select would work to display the grid content but nothing else of other parameters, </span></p>
<p><span style="color: #0000ff;">how to pass a parameter</span></p>
<p><span style="color: #0000ff;">from the grid then to the page to be used like showing a picture of the selected row on the grid??</span></p>
<p>Is there a filter on the grid??? Is it suppose to be editurl to direct the response to a different page???</p>
<p>But why select parameter would work?? I&#39;m really confused and tired of this issue. I appreciate any</p>
<p>hint or guide.<img class="spSmiley" style="margin:0" title="Yell" src="/blog/wp-content/forum-smileys/sf-yell.gif" alt="Yell" /> By the way why when posting on this forum the text are cliped from the most right side?</p></p>
]]></description>
        	        	<pubDate>Wed, 18 Sep 2013 20:35:09 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29491</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29491</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>It is difficult to me to read your post.</p>
<p>Can you please write it a gain?</p>
<p>Just the description - I see the code.</p>
</p>
<p>Kind Regards</p>
]]></description>
        	        	<pubDate>Wed, 18 Sep 2013 11:51:02 +0300</pubDate>
        </item>
        <item>
        	<title>jqgrealynasty on Please help me with paramters passing to asp.net for id</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29486</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/please-help-me-with-paramters-passing-to-asp-net-for-id#p29486</guid>
        	        	<description><![CDATA[<p>A jqgrid uses below js script as sample and default.aspx page which display the grid using C# code. js Script:</p>
<pre class="lang-cs prettyprint prettyprinted"><p><input type='button' class='sfcodeselect' name='sfselectit642' value='Select Code' data-codeid='sfcode642' /></p><div class='sfcode' id='sfcode642'><div class=&#34;&#34;sfcode&#34;&#34;>jQuery(document).ready(function(){    <br />jQuery(&#34;#htmlTable5&#34;).jqGrid({     url:&#39;Default2.aspx?cmd=select&#39;,     mtype: &#39;GET&#39;,<br />&#160;datatype: &#39;json&#39;,     <br />colNames:[&#39;ID&#39;,&#39;Make&#39;],         <br />colModel :[{         <br />name:&#39;id&#39;         <br />,index:&#39;id&#39;         <br />,width:40         <br />,jsonmap:&#39;id&#39;     <br />},{         <br />name:&#39;Make&#39;         <br />,index:&#39;Make&#39;         <br />,align:&#39;left&#39;         <br />,width:60         <br />,jsonmap:&#39;Make&#39;         <br />}],     <br />pager: <br />jQuery(&#39;#htmlPager5&#39;),     <br />rowNum:10,     <br />height: &#34;100%&#34;,     <br />rowList:[10,20,30],     <br />sortname: &#39;id&#39;,     <br />sortorder: &#34;asc&#34;,     <br />viewrecords: true,     <br />reloadAfterSubmit: true,     <br />editurl:&#39;Default2.aspx?cmd=delete&#39;,     <br />onSelectRow: function (id) {         <br />var selr = jQuery(&#39;#htmlTable5&#39;).jqGrid(&#39;getGridParam&#39;, &#39;selrow&#39;);     <br />alert(&#39;Selected row ID &#39; + id);                 <br />if (id == null) {                     <br />id = 0;             <br />que = 1; if (jQuery(&#39;#htmlTable5&#39;).jqGrid(&#39;getGridParam&#39;, &#39;id&#39;) &#62; 0) { <br />jQuery(&#39;#htmlTable5&#39;).jqGrid(&#39;setGridParam&#39;, { url: &#39;Default.aspx?cmd=select&#38;que=0&#38;<br />id=&#39; + id, <br />mytype: &#39;GET&#39;,datatype: &#39;json&#39; }); <br />jQuery(&#39;#htmlTable5&#39;).jqGrid(&#39;setCaption&#39;, &#34;Image Detail: &#34; + id)<br />.trigger(&#39;reloadGrid&#39;); } <br />} else {     <br />jQuery(&#39;#htmlTable5&#39;).jqGrid(&#39;setGridParam&#39;, { url: &#39;Default.aspx?cmd=select&#38;<br />que=1&#38;id=&#39; + id, <br />mytype: &#39;GET&#39;, datatype: &#39;json&#39;}); <br />jQuery(&#39;#htmlTable5&#39;).jqGrid(&#39;setCaption&#39;, &#34;Image Detail: &#34; + id)<br />.trigger(&#39;reloadGrid&#39;);<br />}              <br />}, <br />}).navGrid(&#39;#htmlPager5&#39;,{edit:false,add:false,del:true,search:true,refresh:true});</div></div><br /><p>My Question/Need: I need badly please the feature that when I click to select a row on the  grid, </p><p>the id field of selected row will be</p><p>retrieved in Default.aspx.cs  code file so that it printed in a text box on the Default.aspx page.
</p><p>I could view the grid data but when I click on a row on the grid it  does identify the id (which I want) </p><p>but I cannot retrieve it on the back  code of the page (Default.aspx.cs) as a parameter, </p><p>Default.aspx.cs use  the following to reload the grid: </p><br /><p><input type='button' class='sfcodeselect' name='sfselectit7844' value='Select Code' data-codeid='sfcode7844' /></p><div class='sfcode' id='sfcode7844'><div class=&#34;&#34;sfcode&#34;&#34;>if (Request.QueryString[&#34;cmd&#34;] == &#34;select&#34;)</div></div> it is detected and run the grid but adding <br /><br /><br /><p><input type='button' class='sfcodeselect' name='sfselectit892' value='Select Code' data-codeid='sfcode892' /></p><div class='sfcode' id='sfcode892'><div class=&#34;&#34;sfcode&#34;&#34;>if (Request.QueryString[&#34;cmd&#34;] == &#34;delete&#34;)</div></div> or <br /><p><input type='button' class='sfcodeselect' name='sfselectit2843' value='Select Code' data-codeid='sfcode2843' /></p><div class='sfcode' id='sfcode2843'><div class=&#34;&#34;sfcode&#34;&#34;>if (Request.QueryString[&#34;cmd&#34;] == &#34;que&#34;)</div></div> it is always null.
<br /><p>There is must be something wrong with the request.  Can anybody help please on this issue? I&#39;ll be very </p><p>appreciated.
</p><p>Tried setting: </p><p>jQuery(&#39;#htmlTable5&#39;).jqGrid(&#39;setGridParam&#39;, { url:  &#39;Default.aspx?cmd=select&#38;que=1&#38;id=&#39; + id, </p><p>mytype: &#39;POST&#39;,  datatype: &#39;json&#39;});
</p><p>But it does not work (I see it inside diagnosing tool like firebug is  exist as que 1 but </p><p>on page_load it is always null no matter what  statement I use. Please I need your help..</p></pre>
]]></description>
        	        	<pubDate>Wed, 18 Sep 2013 05:33:55 +0300</pubDate>
        </item>
</channel>
</rss>