<?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: delRowData and setSelection</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection</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/delrowdata-and-setselection/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>zupert on delRowData and setSelection</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection#p1337</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection#p1337</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>I&#39;m so sorry : i just seen the resetSelection() function ....</p>
<p>Then my problem is just solved : the following code makes all the work :</p>
</p>
<p><code></code></p>
<pre>	var filas = jQuery("#tabla").getGridParam(&#39;selarrrow&#39;);
	if (filas == null) {
		return false;
	}
	for(var i=filas.length-1; i&#62;=0; i--) {
		jQuery("#tabla").delRowData(filas[i]);
	}
	jQuery("#tabla").resetSelection();</pre>
</p>
<p>Thank you very much for this plugin and for you atention !</p>
<p>greetings !</p>
]]></description>
        	        	<pubDate>Thu, 31 Jul 2008 01:18:29 +0300</pubDate>
        </item>
        <item>
        	<title>zupert on delRowData and setSelection</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection#p1336</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection#p1336</guid>
        	        	<description><![CDATA[<p>I have a custom button, which status toggles on (un)selecting a rows. Therefor, if the user intends to delete some rows, the selection should remain empty in the end.</p>
<p>But the fact is that if I first delete the rows, then I can&#39;t unselect them, and they stay available in the selarrow. (I should have mention that I use multiselect)</p>
<p>On the other side, if I first unselect&#160; the rows, they are correctly removed from the selarrow, which makes deletion impossible &#8230;</p>
<p>A workaround is to copy the array while unselecting the rows, and to loop another time for deletion&#8230;</p>
<p><code></code></p>
<pre> var filas = jQuery("#tabla").getGridParam(&#39;selarrrow&#39;);
 	if (filas == null) {
 		return false;
 	}
 	 
	var filas_delete = [];
 	var filas_select = filas;
 	
 	for(var i=filas_select.length-1; i&#62;=0; i&#8211;) {
 		filas_delete[i] = filas_select[i];
 		alert(filas_select+&#39;(length=&#39;+filas_select.length+&#39;) current: &#39;+filas_select[i]+
 			&#39;\\n my new array: &#39;+filas_delete
 		);
 		jQuery(&#8221;#tabla&#8221;).setSelection(filas_select[i]);
 	}
 	for(var i=filas_delete.length-1; i&#62;=0; i&#8211;) {
 		alert(filas_delete+&#39;(length=&#39;+filas_delete.length+&#39;) current: &#39;+filas_delete[i]);
 		jQuery(&#8221;#tabla&#8221;).delRowData(filas_delete[i]);
 	} 
</pre></p>
]]></description>
        	        	<pubDate>Thu, 31 Jul 2008 01:09:47 +0300</pubDate>
        </item>
        <item>
        	<title>tony on delRowData and setSelection</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection#p1332</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection#p1332</guid>
        	        	<description><![CDATA[<p>Please tell me what is wrong here - you can not catch the selected rows or you can not delete them?</p>
]]></description>
        	        	<pubDate>Wed, 30 Jul 2008 07:47:14 +0300</pubDate>
        </item>
        <item>
        	<title>zupert on delRowData and setSelection</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection#p1331</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delrowdata-and-setselection#p1331</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>I&#39;m trying to delete the rows selected by the user.</p>
<p>However, I&#39;ve tryied almost all combinations ofthe following loop, without achieving that after it "getGridParam(&#39;selarrrow&#39;)" eguals zero.</p>
<p>How should&#160; I do it ?</p>
<p>Here my code ...</p>
<p>Thanks in advance</p>
<p><code></code></p>
<pre>	var filas = jQuery("#tabla").getGridParam(&#39;selarrrow&#39;);
	if (filas == null) {
		return false;
	} 
	for(var i=filas.length-1; i&#62;=0; i--) {
		alert(filas+&#39;(length=&#39;+filas.length+&#39;) current: &#39;+filas[i]);
		jQuery("#tabla").delRowData(filas[i]);
		jQuery("#tabla").setSelection(filas[i]);
	}
	alert(jQuery("#tabla").getGridParam(&#39;selarrrow&#39;));
</pre>
]]></description>
        	        	<pubDate>Wed, 30 Jul 2008 07:34:40 +0300</pubDate>
        </item>
</channel>
</rss>