<?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: Seleting the checkbox based on XML value</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value</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/seleting-the-checkbox-based-on-xml-value/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28181</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28181</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>@aram535 , sorry for mistake. It was may error.</p>
<p>The setColProperty does not exists. It should be setColProp instead - as Oleg write.</p>
<p>I&#39;m sorry again, but I think Oleg is right. Will see what I can do.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Thu, 31 Jan 2013 10:57:26 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28177</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28177</guid>
        	        	<description><![CDATA[<p>I find introduction of <strong>onInitGrid</strong> callback very helpful, but <em>not in you case</em> <strong>aram535</strong>. What Tony wrote is not exact code. It should be interpreted something like</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4004' value='Select Code' data-codeid='sfcode4004' /></p>
<div class='sfcode' id='sfcode4004'>onInitGrid: function() {<br />&#160; &#160; $(this).jqGrid(&#34;setColProp&#34;, &#34;cb&#34;, {<br />&#160; &#160; &#160; &#160; cellattr: function (rowId, val, rawObject) {<br />&#160; &#160; &#160; &#160; &#160; &#160; ...<br />&#160; &#160; &#160; &#160; }<br />&#160; &#160; });<br />}&#160;</div>
<p>The problem is that it helps not to set value of multilect checkbox because the checkbox is control inside of the cell and cellattr allows to set only attributes of the cell (&#60;td&#62; element) itself.</p>
<p>Like I wrote before the part of the code of <strong>addJSONData</strong>&#160;contains some parts of code which can set values of the multilect checkboxes based on the <strong>selarrrow</strong> array, but the code works only with <strong>datatype: "local"</strong>.</p>
<p>So still don&#39;t see any elegant way to load information which multilect checkbox&#160;should be loaded. One can implement the selection using loop though data inside of <strong>loadComplete</strong> and usage of <strong>setSelection</strong>&#160;sequencially, but such solution will be not so quickly as it could be.</p>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Wed, 30 Jan 2013 19:22:01 +0200</pubDate>
        </item>
        <item>
        	<title>aram535 on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28176</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28176</guid>
        	        	<description><![CDATA[<p>Quick question, according to firebug (this) or the grid variable don&#39;t have a setColProperty() method associated with them.&#160; Am I assuming the wrong information?</p>
<p>I&#39;m using the latest git (master) compiled locally.</p>
]]></description>
        	        	<pubDate>Wed, 30 Jan 2013 17:30:42 +0200</pubDate>
        </item>
        <item>
        	<title>aram535 on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28167</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28167</guid>
        	        	<description><![CDATA[<p>Yes that should cover all of it.&#160; Thank you.</p>
]]></description>
        	        	<pubDate>Tue, 29 Jan 2013 19:31:09 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28161</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28161</guid>
        	        	<description><![CDATA[<p>Hello Oleg,</p>
<p>Thank you for the explanation.</p>
<p>Just I have added onInitGrid event which raises only once before populating the data.</p>
<p>In this event a setColProperties can be used applied for the cb field like this</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5898' value='Select Code' data-codeid='sfcode5898' /></p>
<div class='sfcode' id='sfcode5898'>
<p>&#8230;jqGrid({</p>
<p>&#8230;</p>
<p>onInitGrid : function() {</p>
<p>&#160;&#160;&#160; (this).setColProperty(&#39;cb&#39; { attr : function(...){..} });</p>
<p>}</p>
<p>&#8230;</p>
<p>});</p>
</div>
<p>Hope this make sence since it can be used for other predefined columns.</p>
</p>
<p>Thanks</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Tue, 29 Jan 2013 12:14:59 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28160</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28160</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>I think that the user want to set <em>multilelect</em> chechbox based on <em>&#60;checked&#62;</em> from the data. One can&#39;t define currently&#160;any formatter options or some other options for <em>multilelect</em>&#160;chechbox ("cb" column) so that the values of the checkbox were set based on the data. So one will have to use the method like <strong>setSelection</strong>&#160;sequencially&#160;inside of <strong>loadComplete</strong> to check the checkboxes. After every setting of checkbox the <a href="https://developers.google.com/speed/articles/reflow" target="_blank">reflow</a> of the page will take place, so all will be slowly as it could be.</p>
<p>It would be interesting to be able to assign the the value of the chechbox based on the input data or some callback (see the last parameter of <strong>addMulti</strong>&#160;in <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.3/js/grid.base.js#L1208" target="_blank">the line</a>&#160;and in the line). If the option <strong>deselectAfterSort</strong> set to <strong>false</strong> one can do some triks to fill the chechboxes based on prefilled <strong>selarrrow</strong>&#160;(see <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.3/js/grid.base.js#L1384-L1397" target="_blank">the lines</a> of code). One could fill <strong>selarrrow</strong> for example inside of <strong>beforeProcessing</strong>. In case of usage <strong>datatype: "xml"</strong> &#160;the corresponding code fragment is missing in <strong>addXmlData</strong>.</p>
<p>Probably it would be nice to introduce some additional possibilities for developers to control of predefined "cb", "nm" and "subgrid" columns of grid.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Tue, 29 Jan 2013 11:40:51 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28159</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28159</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Can I assume you have not read the docs?</p>
<p>Please look for using <a href="/jqgridwiki/doku.php?id=wiki:predefined_formatter" target="_blank">formatters in jqGrid</a>.</p>
</p>
<p>Rgerads</p>
]]></description>
        	        	<pubDate>Tue, 29 Jan 2013 10:37:00 +0200</pubDate>
        </item>
        <item>
        	<title>aram535 on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28148</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28148</guid>
        	        	<description><![CDATA[<p>Can I assume this is not possible?</p>
]]></description>
        	        	<pubDate>Mon, 28 Jan 2013 16:06:46 +0200</pubDate>
        </item>
        <item>
        	<title>aram535 on Seleting the checkbox based on XML value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28116</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/seleting-the-checkbox-based-on-xml-value#p28116</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I have the following XML (which can be chaged)being used to popuilate jqGrid 4.4.1:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4233' value='Select Code' data-codeid='sfcode4233' /></p>
<div class='sfcode' id='sfcode4233'>
<p>&#60;rows&#62;</p>
<p>&#160;&#60;row&#62;&#60;id&#62;1&#60;/id&#62;&#60;host&#62;123&#60;/host&#62;&#60;checked&#62;1&#60;/checked&#62;....&#60;/row&#62;</p>
<p>&#160;&#60;row&#62;&#60;id&#62;2&#60;/id&#62;&#60;host&#62;456&#60;/host&#62;&#60;checked&#62;0&#60;/checked&#62;....&#60;/row&#62;</p>
<p>&#60;/rows&#62;</p>
</div>
<p>I would like my grid to have the checkbox for row #1 checked.&#160;</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7393' value='Select Code' data-codeid='sfcode7393' /></p>
<div class='sfcode' id='sfcode7393'>&#160;&#160;&#160; var grid = $(&#34;#grid11&#34;);<br />...<br />&#160;&#160;&#160; grid.jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#39;listHostsXML.php?id=&#39;+id,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;xml&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: &#34;Hosts&#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;post&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; height: &#39;auto&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; hidegrid: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; loadonce: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; autowidth: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; multiselect: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rownumbers: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: -1,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; edit:false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; add:false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; del:false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;Id&#39;,&#39;Host&#39;,....],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [{ ... }]<br />});</div>
]]></description>
        	        	<pubDate>Thu, 24 Jan 2013 22:23:29 +0200</pubDate>
        </item>
</channel>
</rss>