<?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: checkbox formatter</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/checkbox-formatter</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/checkbox-formatter/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on checkbox formatter</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/checkbox-formatter#p22164</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/checkbox-formatter#p22164</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Let&#39;s think what is happen.</p>
<p>Q.What is formatter?</p>
<p>A. Formatter represets the data in new way into the grid and nothing more. They do not change the grid internal data or exactly if its visible data is changed under some condition it will not reflect the futute data processing.</p>
<p>Note that by defaule the <strong>disabled</strong> feature for the checkbox is true. The interaction is disbled exctley beqouse of the reasons above.</p>
</p>
<p>In order to work this you should implement some editing module like cell edit one.</p>
<p>Note that if you do that for local data manipulation you should set explecit which column is a id. For this purpose use key : true property - see docs.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 21 Feb 2011 20:34:34 +0200</pubDate>
        </item>
        <item>
        	<title>Viral Gala on checkbox formatter</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/checkbox-formatter#p22155</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/checkbox-formatter#p22155</guid>
        	        	<description><![CDATA[<p>I wanted to sort the column having checkbox formatter</p>
<p>I am using checkbox formatter with formatoptions:{disabled :false}</p>
<p>Suppose my grid contain 6 row with three row containing checkbox as checked and other as not checked</p>
<p>If user check fourth checkbox and then sort thean all four rows out of six should be at the start or end of grid</p>
<p>currently if user click on sort then only3 rows with checkbox as checked are displayed</p>
<p>I am using unformat option but the unformat function is not getting called while sorting</p>
<p>I am using jqgrid 7.2 version</p>
</p>
<p>Below is the code</p>
<p>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&#62;</p>
<p>&#60;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&#62;</p>
<p>&#60;head&#62;</p>
<p>&#60;title&#62; jq_grid test &#60;/title&#62;</p>
<p>&#60;link rel="stylesheet" type="text/css" media="screen" href="css/ui-lightness/jquery-ui-1.8.4.custom.css"/&#62;</p>
<p>&#60;link rel="stylesheet" type="text/css" media="screen" href="js/src/css/ui.jqgrid.css"/&#62;</p>
<p>&#60;script src="js/jquery.min.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script src="js/src/i18n/grid.locale-en.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script src="js/src/grid.base.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script src="js/jquery.jqGrid.min.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script src="grid.headingColspan.js" type="text/javascript"&#62;&#60;/script&#62;</p>
</p>
<p>&#60;script type="text/javascript"&#62;</p>
</p>
<p>function  myunformatCurrency (cellvalue, options, cellobject )</p>
<p>{</p>
<p>alert(cellvalue);</p>
<p>return cellvalue;</p>
<p>}</p>
</p>
<p>jQuery(document).ready(function(){</p>
</p>
<p>jQuery("#list").jqGrid({</p>
<p>datatype: "local",</p>
<p>height: 250,</p>
<p>colNames:[&#39;Inv No&#39;,&#39;Date&#39;, &#39;Client&#39;, &#39;Amount&#39;,&#39;Tax&#39;,&#39;Total&#39;,&#39;Notes&#39;, &#39;closed&#39;],</p>
<p>colModel:[</p>
<p>{name:&#39;id&#39;,index:&#39;id&#39;, width:60, sorttype:"int"},</p>
<p>{name:&#39;invdate&#39;,index:&#39;invdate&#39;, width:90, sorttype:"date"},</p>
<p>{name:&#39;name&#39;,index:&#39;name&#39;, width:100},</p>
<p>{name:&#39;amount&#39;,index:&#39;amount&#39;, width:80, align:"right",sorttype:"float"},</p>
<p>{name:&#39;tax&#39;,index:&#39;tax&#39;, width:80, align:"right",sorttype:"float"},</p>
<p>{name:&#39;total&#39;,index:&#39;total&#39;, width:80,align:"right",sorttype:"float"},</p>
<p>{name:&#39;note&#39;,index:&#39;note&#39;, width:150, sortable:false},</p>
<p>{name:&#39;closed&#39;,index:&#39;closed&#39;,width:55,align:&#39;center&#39;, editable :true, formatter:&#39;checkbox&#39;,formatoptions:{disabled :false}, unformat:myunformatCurrency,sortable: true,sorttype:"number" }</p>
<p>],</p>
<p>caption: "Manipulating Array Data"</p>
<p>});</p>
<p>var colNames = ["id", "invdate", "name", "note", "amount", "tax", "total", "closed"];</p>
<p>var newData = [</p>
<p>[10, "2007-09-01", "test4","new data", "600.00", "1.00", "601.00", 0],</p>
<p>[11, "2007-09-02", "test5","new data11", "602.00", "1.00", "603.00", 1],</p>
<p>[12, "2007-09-02", "test5","new data11", "602.00", "1.00", "603.00", 0],</p>
<p>[13, "2007-09-02", "test5","new data11", "602.00", "1.00", "603.00", 1],</p>
<p>[14, "2007-09-02", "test5","new data11", "602.00", "1.00", "603.00",0],</p>
<p>[15, "2007-09-02", "test5","new data11", "602.00", "1.00", "603.00", 1]</p>
<p>];</p>
</p>
<p>for(r = 0; r &#60; newData.length; r++)</p>
<p>{</p>
<p>for(c = 0; c &#60;= colNames.length; c++)</p>
<p>{</p>
<p>oper = c == 0 ? &#39;addRowData&#39; : &#39;setRowData&#39;;</p>
<p>jQuery("#list").jqGrid(oper,r ,eval("({" + colNames[c]+":"" + newData[r][c] + ""})"));</p>
<p>}</p>
<p>}</p>
</p>
<p>});</p>
<p>&#60;/script&#62;</p>
<p>&#60;/head&#62;</p>
<p>&#60;body&#62;</p>
<p>&#60;table id="list" class="scroll"&#62;&#60;/table&#62;</p>
<p>&#60;div id="pager" class="scroll" style="text-align:center;"&#62;&#60;/div&#62;</p>
<p>&#60;/body&#62;</p>
<p>&#60;/html&#62;</p>
<p>Please help</p>
</p>
<p>Thanks,</p>
<p>Viral Gala</p></p>
]]></description>
        	        	<pubDate>Sun, 20 Feb 2011 16:58:35 +0200</pubDate>
        </item>
</channel>
</rss>