<?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: dynamic colModel</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3</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/dynamic-colmodel-3/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>hpoe on dynamic colModel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6556</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6556</guid>
        	        	<description><![CDATA[<p>Alan thanks, this would be a solution. I used another way to do it, because it would be too much to handle in a script.</p>
<p>We have about 20000 different item configurations, each with up to 30 attributes and up to 1500 configs per item configurations and 3 languages.</p>
<p>[Image Can Not Be Found]: <a title="Exaple" href="http://ruegg.mediando.ch/images/bookmarks/mediando_web003.png" target="_blank"><a href="http://ruegg.mediando.ch/image" rel="nofollow">http://ruegg.mediando.ch/image</a>.....web003.png</a>[Image Can Not Be Found]</p>
<p>[Image Can Not Be Found]</p>
<p>one page is set up for one item, each row in the grid is a specific item with specific attributes plus price, which make up the row.</p>
<p>Fix in the grid is only the item no on the left and the price on the right.</p>
<p>My solution for this solution was to create a stored proc which created the select for the grid from basically 3 tables (items, item_attr and prices), the colModel and the colNames and the result of this procedure is stored in a table.</p>
<p>At runtime I add the colmodel and colnames from this table to the javascript and I let again a stored proc execute the generated select in a coldfusion component.</p>
<p>This performs quite wll, I just have a few formatting problems. e.g. the right most price column is cut off, but that&#39;s another story.</p>
]]></description>
        	        	<pubDate>Fri, 08 May 2009 05:38:02 +0300</pubDate>
        </item>
        <item>
        	<title>alan on dynamic colModel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6553</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6553</guid>
        	        	<description><![CDATA[<p>I am doing something which sounds like what you are wanting to do, except I am using ASP instead of Coldfusion. Check this out and see if it helps...</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3951' value='Select Code' data-codeid='sfcode3951' /></p>
<div class='sfcode' id='sfcode3951'>
<p>&#60;%</p>
<p>set rsMapFields=GetMapFields(reqMapID)</p>
<p>%&#62;</p>
<p>&#160;&#160;$("#list").jqGrid({</p>
<p>&#160;&#160; &#160;url:&#39;CategoryMapsCode.asp?map_id=&#60;%=reqMapID%&#62;&#39;,</p>
<p>&#160;&#160; &#160;datatype: &#39;xml&#39;,</p>
<p>&#160;&#160; &#160;mtype: &#39;GET&#39;,</p>
<p>&#60;%</p>
<p><span> </span>colNames="colNames:[&#39;ID&#39;,&#39;map_id&#39;,&#39;segment_id&#39;,&#39;Segment&#39;"</p>
<p><span> </span>rsMapFields.MoveFirst</p>
<p><span> </span>Do While Not rsMapFields.EOF <span> </span>&#39;set read-only fields as so</p>
<p>colNames=colNames &#38;",&#39;"&#38; rsMapFields.Fields("field_column_description").value &#38;"&#39;"</p>
<p><span> </span>rsMapFields.MoveNext</p>
<p><span> </span>Loop</p>
<p><span> </span>colNames=colNames &#38;"],"</p>
<p><span> </span>Response.Write(colNames)</p>
<p>%&#62;</p>
</p>
<p><span> </span>colModel :[&#160;</p>
<p><span> </span>{name:&#39;row_id&#39;, index:&#39;row_id&#39;, width:35, hidden:false, hidedlg:true},&#160;</p>
<p><span> </span>{name:&#39;map_id&#39;, index:&#39;map_id&#39;, width:40, hidden:true, hidedlg:true},&#160;</p>
<p><span> </span>{name:&#39;segment_id&#39;, index:&#39;segment_id&#39;, width:35, editable:true, hidden:true, hidedlg:true},</p>
<p><span> </span>{name:&#39;segment_name&#39;, index:&#39;segment_name&#39;, editable:true, width:45, edittype:"select", editoptions:{value:"&#60;%=tSegmentList%&#62;"}}&#60;%</p>
<p><span> </span>rsMapFields.MoveFirst</p>
<p><span> </span>Do While Not rsMapFields.EOF <span> </span>&#39;set read-only fields as so</p>
<p><span> </span>field_name=rsMapFields.Fields("field_column_name").value</p>
<p><span> </span>field_addable=rsMapFields.Fields("input_for_new_record").value</p>
<p><span> </span>field_width=rsMapFields.Fields("column_width").value</p>
<p><span> </span>tValue=""</p>
<p><span> </span>if field_addable="1" then tValue=", editable:true" end if</p>
<p><span> </span>if len(field_width) &#62; "0" then tWidth=", width:"&#38;field_width end if</p>
<p><span> </span>reqSegmentID=tSegmentID</p>
<p><span> </span>if not IsNull(rsMapFields.Fields("option_values_function").value) then</p>
<p><span> </span>set rsValues=Eval(rsMapFields.Fields("option_values_function").value)</p>
<p><span> </span>Do While Not rsValues.EOF&#160;</p>
<p><span> </span>tParamValue=trim(rsValues.Fields("param_value").value)</p>
<p><span> </span>if len(tParamList) &#60; 1 then</p>
<p><span> </span>tParamList=tParamValue &#38;":"&#38; tParamValue</p>
<p><span> </span>else</p>
<p><span> </span>tParamList=tParamList &#38;";"&#38; tParamValue &#38;":"&#38; tParamValue</p>
<p><span> </span>end if</p>
<p><span> </span>rsValues.MoveNext</p>
<p><span> </span>Loop</p>
<p><span> </span>CloseRecordSet(rsValues)</p>
<p><span> </span>field_definition=",{name:&#39;"&#38; field_name &#38;"&#39;, index:&#39;"&#38; field_name &#38;"&#39; "&#38; tValue &#38; tWidth &#38; ", edittype:""select"", editoptions:{value:""" &#38; tParamList &#38; """}}"</p>
<p><span> </span>else</p>
<p><span style="white-space: pre;"> </span>field_definition=",{name:&#39;"&#38; field_name &#38;"&#39;, index:&#39;"&#38; field_name &#38;"&#39; "&#38; <span style="white-space: pre;"> </span>tValue &#38; tWidth &#38;"}"</p>
<p><span style="white-space: pre;"> </span>end if</p>
<p><span style="white-space: pre;"> </span>Response.Write(field_definition)</p>
<p>rsMapFields.MoveNext</p>
<p><span> </span>Loop</p>
<p><span> </span>Response.Write("],")</p>
<p>%&#62;</p>
<p><span> </span>sortname: "row_id",</p>
<p>&#160;&#160; &#160;pager: $(&#39;#pager&#39;),</p>
<p>&#160;&#160; &#160;editurl:&#39;CategoryMapsModify.asp&#39;,</p>
<p>&#160;&#160; &#160;rowNum:30,</p>
<p>&#160;&#160; &#160;rowList:[10,20,30,50,100,300,500,1000],</p>
<p>&#160;&#160; &#160;sortorder: "desc",</p>
<p>&#160;&#160; &#160;viewrecords: true,</p>
<p>&#160;&#160; &#160;height: &#39;auto&#39;,</p>
<p>......................</p>
</div>
]]></description>
        	        	<pubDate>Thu, 07 May 2009 19:58:13 +0300</pubDate>
        </item>
        <item>
        	<title>hpoe on dynamic colModel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6198</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6198</guid>
        	        	<description><![CDATA[<p>OK, i try to ask differently.</p>
<p>I have create a grid for products which have very different configurations eg size, power, weight. 1 product on one html page, one coModel per product. colNames depending on selected language. In the grid the different dimensions / configurations / prices have to be shown. Moreover filtering with selection lists to all columns is a must, an of course paging.</p>
<p>I am not sure but I think my only option is to generate the javascript configuration the first time a product is called and save it language dependent in the database for later usage.</p>
<p>Generating an xml configuration would be easier, but I don&#39;t know how to include the option lists and the configuration for the search toolbar. The existing example is very basic and the  json_test.txt and xml_test.xml files are not in the distribution package 3.4.3</p>
]]></description>
        	        	<pubDate>Tue, 21 Apr 2009 08:22:34 +0300</pubDate>
        </item>
        <item>
        	<title>tony on dynamic colModel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6167</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6167</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Could not answer, since the question is too common. It depends on how complex is your task</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 20 Apr 2009 07:04:26 +0300</pubDate>
        </item>
        <item>
        	<title>hpoe on dynamic colModel</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6146</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-colmodel-3#p6146</guid>
        	        	<description><![CDATA[<p>I am a jquery + jqGrid newbe, so I would be glad to get a few hints.</p>
<p>I have to present technical data for items of different dimensions in a searchable Grid.</p>
<p>Example: <a href="http://www.d-a.ch/site/index__gast-d-4675-44-4480.html" rel="nofollow" target="_blank"><a href="http://www.d-a.ch/site/index__" rel="nofollow">http://www.d-a.ch/site/index__</a>.....-4480.html</a></p>
<p>The technical data can be from 1 to 35 columns including price with a maximum of 1200 rows, added complexityis that not all rows have all columns, so I would need to change the standard json or xmlreader.</p>
<p>My idea would by to generate the colModel and colNames including the select list, kind of Excel auto select.</p>
<p>Would it be better to generate the javascript configuration or a configuration xml. I would like to store the configuration in the database the first time the item is asked for.</p>
<p>We are using coldfusion. Any help appreciated!</p>
<p>TIA</p>
<p>hpoe</p>
]]></description>
        	        	<pubDate>Sun, 19 Apr 2009 08:32:22 +0300</pubDate>
        </item>
</channel>
</rss>