<?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: Create grid with dynamic columns</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/create-grid-with-dynamic-columns</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/create-grid-with-dynamic-columns/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Create grid with dynamic columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/create-grid-with-dynamic-columns#p16377</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/create-grid-with-dynamic-columns#p16377</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You can use GridUnload method to destroy the grid an create it again with the new columns smething like</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit313' value='Select Code' data-codeid='sfcode313' /></p>
<div class='sfcode' id='sfcode313'>
<p>var colmodel1 = &#8230;</p>
<p>var colmodel2 = &#8230;</p>
<p>$(&#34;#myselect&#34;).change(function(){</p>
<p>if($(this).val() == &#34;1&#8243;) {</p>
<p>$(&#34;#mygrid&#34;).GridUnload();</p>
<p>$(&#34;#mygrid&#34;).jqGrid({&#8230; colModel: colmodel1,&#8230;})</p>
<p>} else if( &#8230;) {</p>
<p>$(&#34;#mygrid&#34;).GridUnload();</p>
<p>$(&#34;#mygrid&#34;).jqGrid({&#8230; colModel: colmodel2,&#8230;})</p>
<p>}</p>
<p>});</p>
</div>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 13 Apr 2010 15:00:26 +0300</pubDate>
        </item>
        <item>
        	<title>jin on Create grid with dynamic columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/create-grid-with-dynamic-columns#p16323</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/create-grid-with-dynamic-columns#p16323</guid>
        	        	<description><![CDATA[<p>I want to show data for a specific project but each project has diiferent number of columns in the table. Knowing which project is to be displayed i can find out how how columns are in the table before grid creation. Is there a way to now set colnames and colmodels dynamically to the number of columns in the project and to get colnames from the database as well.</p>
</p>
<p>So if P1 has 2col (A,B) and P2 has 3col (X,Y,Z). so if user chooses P2 from html&#160;dropdown and clicks submit i want a grid with 3 col with header x,y,z to be created, likely if they choose p1 the grid shoul have 2col with a,b as headers&#160;</p>
</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Fri, 09 Apr 2010 09:00:22 +0300</pubDate>
        </item>
</channel>
</rss>