<?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: MultiSelect: Setting Items as Selected On Grid Load</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load</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/multiselect-setting-items-as-selected-on-grid-load/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>thatisscary on MultiSelect: Setting Items as Selected On Grid Load</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2110</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2110</guid>
        	        	<description><![CDATA[<p>Tony:</p>
</p>
<p>Thanks:</p>
<p>I think what you meant was:</p>
<p>1) add a hidden column to the grid with the name "selected".</p>
<p>2) in the gridComplete function to the following:</p>
</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var rowIds = $("#places").getDataIDs ();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for( var i = 0; i&#60;rowIds.length ; ++i)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var rowData = $("#places").getRowData( rowIds[i]);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if( rowData.selected&#160; == "true")<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#places").setSelection( rowIds[i]);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>It works like a charm.</p>
</p>
<p>Thanks,</p>
</p>
<p>Matthew</p></p>
]]></description>
        	        	<pubDate>Thu, 18 Sep 2008 14:07:04 +0300</pubDate>
        </item>
        <item>
        	<title>tony on MultiSelect: Setting Items as Selected On Grid Load</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2105</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2105</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Use the undocumented</p>
<p>gridComplete event for this purpose.</p>
<p>It fires after all is done in the grid.</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 18 Sep 2008 12:53:28 +0300</pubDate>
        </item>
        <item>
        	<title>thatisscary on MultiSelect: Setting Items as Selected On Grid Load</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2104</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2104</guid>
        	        	<description><![CDATA[<p>Tony:</p>
<p>I am sorry, I was not clear.&#160; What I want to be able to do is to load</p>
<p>data into the grid, (with Multi Select) and specifiy (at the time of load) in json ( for example),</p>
<p>that a particular row is selected. For example the json for each row would</p>
<p>look like this</p>
</p>
<p>&#160;{ id:"123454, "selected": "true", "cell":["I am a Selected..." etc.</p>
<p>I poked around the Json data load script, and I know pretty well where this would have to be called.&#160; The call internal call to setSelection( ) seems to be failing at this point, ( this would seem to be the easiest way to handle this, while adding a "checked = checked to the dyanmically created checkbox.),</p>
<p>Anyway, if you can think of a possible shortcut to this,&#160; and point me there I would be more than happy to implement and then share the code.&#160;</p>
<p>Thanks again.&#160; Sorry for the cryptic post previous to this.</p>
<p>Matthew</p></p>
]]></description>
        	        	<pubDate>Thu, 18 Sep 2008 12:41:47 +0300</pubDate>
        </item>
        <item>
        	<title>tony on MultiSelect: Setting Items as Selected On Grid Load</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2093</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2093</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>getGridParam(&#39;selrow&#39;)</p>
<p>Retur the currentlly selected row - null otherwise.</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 18 Sep 2008 09:23:57 +0300</pubDate>
        </item>
        <item>
        	<title>thatisscary on MultiSelect: Setting Items as Selected On Grid Load</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2084</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/multiselect-setting-items-as-selected-on-grid-load#p2084</guid>
        	        	<description><![CDATA[<p>Is there away in the data to specify that a row is to be selected.</p>
</p>
<p>Looking at the rowdata method, it seems that there is no way to do this?&#160;</p>
<p>Am I mistaken?</p>
</p>
<p>Matthew</p></p>
]]></description>
        	        	<pubDate>Wed, 17 Sep 2008 17:03:57 +0300</pubDate>
        </item>
</channel>
</rss>