<?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 If Statement</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-if-statement</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-if-statement/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>iccsi on jqGrid If Statement</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-if-statement#p29352</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-if-statement#p29352</guid>
        	        	<description><![CDATA[<div>I want to pass zero if my text box is empty or pass the value if user enter a value the text box</div>
<div>I use following code to pass which works without if statement</div>
<div>&#160;</div>
<div>&#160;jQuery("#MyGrid").jqGrid(&#39;setGridParam&#39;,{url: "../MyServer.cfc?method=MyMethod&#38;StartDate="<br />&#160;&#160; +jQuery("#dtpStartDate").val()+"&#38;EndDate="<br />&#160;&#160; +jQuery("#dtpEndDate").val()+"&#38;MyNumber="<br />&#160;&#160; +jQuery("#Mytxt").val()}).trigger("reloadGrid")</div>
<div>&#160;</div>
<div>&#160;</div>
<div>I just added if stament like following code, but it fails</div>
<div>&#160;</div>
<div>&#160;jQuery("#MyGrid").jqGrid(&#39;setGridParam&#39;,{url: "../MyServer.cfc?method=MyMethod&#38;StartDate="<br />&#160;&#160; +jQuery("#dtpStartDate").val()+"&#38;EndDate="<br />&#160;&#160; +jQuery("#dtpEndDate").val()+"&#38;MyNumber="<br />&#160;&#160; +if(jQuery("#Mytxt").val().length == 0)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {0}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Else<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {jQuery("#Mytxt").val()}).trigger("reloadGrid")</div>
<div>&#160;</div>
<div>&#160;</div>
<div>I would like to learn how I can pass parameter base on user entry or not,</div>
<div>Your help and information is great appreciated,</div>
]]></description>
        	        	<pubDate>Tue, 20 Aug 2013 21:55:37 +0300</pubDate>
        </item>
</channel>
</rss>