<?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: Reload grid with xmlstring</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring</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/reload-grid-with-xmlstring/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>bakunin on Reload grid with xmlstring</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring#p7664</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring#p7664</guid>
        	        	<description><![CDATA[<p>It now work for me, i used your sample senthill 😛</p>
<p>i changed this:</p>
<p><span class="sfcode">jQuery(&#8221;#item_17&#8243;).trigger(&#8221;reloadGrid&#8221;);</span></p>
<p>to this:</p>
<p><span class="sfcode">jQuery("#item_17").setGridParam({ datatype: &#39;xmlstring&#39;, datastr: item_17_xml }).trigger("reloadGrid"); </span></p>
<p>I would like to help you but i started learning jquery a week ago so i have no idea if what you are doing can be done. 🙁</p>
]]></description>
        	        	<pubDate>Mon, 06 Jul 2009 12:39:42 +0300</pubDate>
        </item>
        <item>
        	<title>senthil on Reload grid with xmlstring</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring#p7659</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring#p7659</guid>
        	        	<description><![CDATA[<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">This should re-load the grid with new source:</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">&#60;script language=javascript&#62;</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">LoadData = function() {</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">var mygrid = $("#list")[0];</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">sXML = "&#60;rows&#62;&#60;row&#62;&#60;cell&#62;data1&#60;/cell&#62;&#60;cell&#62;data2&#60;/cell&#62;&#60;/row&#62;&#60;/rows&#62;"</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">if</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">(!mygrid.grid) {</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">jQuery("#list").jqGrid({datatype: &#39;xmlstring&#39;,datastr: sXML,width: 400,colNames: [&#39;cell 1&#39;, &#39;cell 2&#39;],colModel: [{ name: &#39;cell1&#39;, index: &#39;cell1&#39;, width: 75 },{ name: &#39;cell1&#39;, index: &#39;cell2&#39;, width: 190}],pager: jQuery(&#39;#pager&#39;),rowNum: 10,rowList: [10, 50, 100], viewrecords: true,imgpath: &#39;themes/basic/images&#39;,caption: &#39;My first grid&#39;}).navGrid(&#39;#pager&#39;, { add: true, edit: true, del: true});}</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">else</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">{ sXML = "&#60;rows&#62;&#60;row&#62;&#60;cell&#62;new data1&#60;/cell&#62;&#60;cell&#62;new data2&#60;/cell&#62;&#60;/row&#62;&#60;/rows&#62;"</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">$("#list").setGridParam({ datatype: &#39;xmlstring&#39;, datastr: sXML }).trigger("reloadGrid" </span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">);}}&#60;/script&#62;</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">&#60;/head&#62;</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">&#60;body&#62;</span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"><span style="font-size: x-small; color: #0000ff;">&#60;table id="list" class="scroll" width=200&#62;&#60;/table&#62;&#60;div id="pager" class="scroll" style="text-align:center;" width=200&#62;&#60;/div&#62;&#60;div id="pagernav" class="scroll" style="text-align:center;"&#62;&#60;/div&#62;&#60;input type=button onclick="LoadData()" value="Load Grid" /&#62;&#60;input type=button onclick="LoadData()" value="Re-Load Grid"&#160; /&#62;&#60;/body&#62;&#60;/html&#62;<br /></span></span></p>
<p><span style="font-size: x-small; color: #0000ff;"></span></p>
]]></description>
        	        	<pubDate>Sun, 05 Jul 2009 23:57:05 +0300</pubDate>
        </item>
        <item>
        	<title>bakunin on Reload grid with xmlstring</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring#p7658</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring#p7658</guid>
        	        	<description><![CDATA[<p>I have the same problem here is a sample of my code:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3050' value='Select Code' data-codeid='sfcode3050' /></p>
<div class='sfcode' id='sfcode3050'>jQuery("#item_17").jqGrid({&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;xmlstring&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datastr : item_17_xml,<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;});</div>
<p>Then on another jquery object, when a an event happen i have this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2333' value='Select Code' data-codeid='sfcode2333' /></p>
<div class='sfcode' id='sfcode2333'>
<p>var item_17_xml =&#160; get_node("xml/main.xml",NODE.id); <br />jQuery("#item_17").clearGridData() ;<br />jQuery("#item_17").trigger("reloadGrid");</p>
</div>
<p>The clearGridData does work but the reloadGrid doesnt work.</p>
]]></description>
        	        	<pubDate>Sun, 05 Jul 2009 23:35:38 +0300</pubDate>
        </item>
        <item>
        	<title>senthil on Reload grid with xmlstring</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring#p7650</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/reload-grid-with-xmlstring#p7650</guid>
        	        	<description><![CDATA[<p>I have two different xmlstring as source for grid.Depending upon some codition I want to replace the previously assigned xmlstring source with new xmlstring source. I tried .trigger("reloadGrid") but it does not show the grid with new data.What I should do to replace the old source with new source and vice-versa.</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Fri, 03 Jul 2009 04:27:06 +0300</pubDate>
        </item>
</channel>
</rss>