<?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: Delete table content?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/delete-table-content</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/delete-table-content/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>emo.antonov on Delete table content?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22158</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22158</guid>
        	        	<description><![CDATA[<p>OK if someone have the same situation like me here is the solution:</p>
<p>- I made function for grid initialization:</p>
<p>function constructGrid(){<br />&#160;&#160; &#160;&#160;&#160; &#160;$("#mygrid").jqGrid(&#39;GridUnload&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#mygrid").jqGrid({ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;datatype: "local", <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;height: 200, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;One&#39;, &#39;Two&#39;, &#39;Three&#39;, &#39;Four&#39;,&#39;Five&#39;], <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colModel:[ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;col1&#39;,index:&#39;col1&#39;, width:100}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;col2&#39;,index:&#39;col2&#39;, width:100}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;col3&#39;,index:&#39;col3&#39;, width:100}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;col4&#39;,index:&#39;col4&#39;, width:100}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;col5&#39;,index:&#39;col5&#39;, width:100} <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;], <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;caption: "Some Caption"<br />&#160;&#160; &#160;&#160;&#160; &#160;});<br />&#160;&#160; &#160;}</p>
<p>- on document.ready &#8211; call :</p>
<p>constructGrid();</p>
<p>- on callback function which returns new data:</p>
<p>success: function(data){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;constructGrid();<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;for(var i = 0; i &#60;= data.length; i++) <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#mygrid").jqGrid(&#39;addRowData&#39;, i+1, data[i]); <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}</p>
</p>
<p>And that works for me.</p>
]]></description>
        	        	<pubDate>Mon, 21 Feb 2011 09:34:23 +0200</pubDate>
        </item>
        <item>
        	<title>emo.antonov on Delete table content?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22111</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22111</guid>
        	        	<description><![CDATA[<p>grid.custom.js is loaded after jquery.jqGrid.min.js (I&#39;ve try before and after and still the same <img class="spSmiley" style="margin:0" title="Confused" src="/blog/wp-content/forum-smileys/sf-confused.gif" alt="Confused" />)</p>
]]></description>
        	        	<pubDate>Thu, 17 Feb 2011 15:49:56 +0200</pubDate>
        </item>
        <item>
        	<title>emo.antonov on Delete table content?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22110</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22110</guid>
        	        	<description><![CDATA[<p>It was my mistake by using GridUnload. This is the correct way:</p>
<p>jQuery("#maygrid").jqGrid(&#39;GridUnload&#39;);</p>
<p>But no matter that now the result in firebug is:</p>
<p>u.p is undefined</p>
]]></description>
        	        	<pubDate>Thu, 17 Feb 2011 15:07:05 +0200</pubDate>
        </item>
        <item>
        	<title>emo.antonov on Delete table content?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22109</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22109</guid>
        	        	<description><![CDATA[<p>I just try something like this:</p>
<p>GridUnload(jQuery("#maygrid"));</p>
<p>for(var i = 0; i &#60;= data.length; i++) <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#maygrid").jqGrid(&#39;addRowData&#39;, i+1, data[i]);</p>
<p>And the grid was empty, but not pre filled.</p>
]]></description>
        	        	<pubDate>Thu, 17 Feb 2011 14:44:00 +0200</pubDate>
        </item>
        <item>
        	<title>emo.antonov on Delete table content?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22108</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delete-table-content#p22108</guid>
        	        	<description><![CDATA[<p>Hello guys. I am using jqgrid to create dinamic tables with datatype: "local". But i saw something strange: instead of replacing rows the grid is appending new results. So i was wondering is there a way to flush table content before add new data?</p>
<p>Thanks in advance!</p>
]]></description>
        	        	<pubDate>Thu, 17 Feb 2011 14:28:21 +0200</pubDate>
        </item>
</channel>
</rss>