<?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: GridToForm method alters checkbox value and possible fix</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/gridtoform-method-alters-checkbox-value-and-possible-fix</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/bugs/gridtoform-method-alters-checkbox-value-and-possible-fix/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on GridToForm method alters checkbox value and possible fix</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/gridtoform-method-alters-checkbox-value-and-possible-fix#p9212</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/gridtoform-method-alters-checkbox-value-and-possible-fix#p9212</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thank you for this.</p>
<p>I just added a "or" operator for checking if this is checkbox again with radio. The change is in GitHub.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 02 Sep 2009 04:45:16 +0300</pubDate>
        </item>
        <item>
        	<title>ctengiz on GridToForm method alters checkbox value and possible fix</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/gridtoform-method-alters-checkbox-value-and-possible-fix#p9186</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/gridtoform-method-alters-checkbox-value-and-possible-fix#p9186</guid>
        	        	<description><![CDATA[<p>Suppose we have a column model such as :<br />{editoptions: {value: &#8220;1:0&#168;}, edittype: &#8220;checkbox&#8221;, align: &#8220;center&#8221;, editable: true, formatter: &#8220;checkbox&#8221;, name: &#8220;ck_pub&#8221;}</p>
<p>and in our custom form, an input type of checkbox as :</p>
<p>&#60;input type=&#8220;checkbox&#8221; name=&#8220;ck_pub&#8221; id=&#8220;ck_pub&#8221; class=&#8220;ui-state-highlight&#8221; value=&#8220;1&#168; /&#62;</p>
<p>When using GridToForm on a uncheck gridrow turns above html as <br />&#60;input type="checkbox" name="ck_pub" id="ck_pub" class="ui-state-highlight" value="0" checked="" /&#62;&#160; </p>
<p>The possible fix is in grid.formedit.js addin below code from line 1538</p>
<p>} else if ( $(&#8221;[name="+i+"]&#8220;,formid).is(&#8221;input:checkbox&#8221;) ) {<br />$(&#8221;[name="+i+"]&#8220;,formid).each( function() {<br />if( $(this).val() == rowdata[i] ) {<br />$(this).attr(&#8221;checked&#8221;,&#8221;checked&#8221;);<br />} else {<br />$(this).attr(&#8221;checked&#8221;,&#8221;&#8221;);<br />}<br />});</p>
<p>Is that ok?</p>
]]></description>
        	        	<pubDate>Tue, 01 Sep 2009 11:59:24 +0300</pubDate>
        </item>
</channel>
</rss>