<?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: Dropdowns bind to a "text" value instead of a key value....</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value</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/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Dropdowns bind to a "text" value instead of a key value....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1440</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1440</guid>
        	        	<description><![CDATA[<p>Ok,</p>
<p>When the values are static here is a fragment on how to do that:</p>
<p>afterInsertRow : function(rowid,recdata){</p>
<p>var idtotext;</p>
<p>colid = 2; //the id of the column which holds the select begin from 0</p>
<p>switch (recdata.selectid){</p>
<p>case &#39;AB&#39;:</p>
<p>idtotext = &#39;ABTEXT&#39;;</p>
<p>break;</p>
<p>&#8230;.</p>
<p>}</p>
<p>$(&#8221;#mygrid&#8221;).SetCell(rowid,colid,idtotext);</p>
<p>// when we use colid instead of colname this method is faster</p>
<p>}</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 07 Aug 2008 10:27:50 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Dropdowns bind to a "text" value instead of a key value....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1436</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1436</guid>
        	        	<description><![CDATA[<p>This is true only if the values in editoptions are static. In case of dynamic values in options this will not work since the engine will read the data, but the text are not redy yet.</p>
<p>Instead I will try to investigate this</p>
<p>Thank you</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 07 Aug 2008 05:27:36 +0300</pubDate>
        </item>
        <item>
        	<title>daniel.pool on Dropdowns bind to a "text" value instead of a key value....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1434</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1434</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Sorry to butt in on a post, but I was about to request the same feature. My drop down lists uses the database ID of a field for the select&#39;s value and a text field as it&#39;s text. The fact that jGrid returns the value is great as I can simply put the ID into the referencing object. However, I&#39;m having to fudge some nasty look up code (a problem with my companies framework) in order to provide the text value in the cell to resolve the drop down. It would be much easier for me to be able to use the ID and have the drop down resolve using that.</p>
<p>Regards,</p>
<p>~Dan</p>
<p>P.S. Your suggest to use the text and the value element of the select is not really feasible as some of the names can be very long and are not guaranteed to be unique.</p>
]]></description>
        	        	<pubDate>Thu, 07 Aug 2008 05:15:33 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Dropdowns bind to a "text" value instead of a key value....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1433</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1433</guid>
        	        	<description><![CDATA[<p>Hi Jon,</p>
<p>I think that I do not undertstand something. So let me explain what I know.</p>
<p>To the grid you send the text of the combo - right?</p>
<p>You use formedit to change the values of that field.</p>
<p>But before doing this jqGrid should know what for values and text are</p>
<p>for this combo - right? This is done via editoptions:{value:"key1:value1;...</p>
<p>In other words you should construct editoptions value. This can be</p>
<p>done statically and dynamically depending on your needs - or simply</p>
<p>we should have the key before they is sended to the server.</p>
<p>My question is where are the keys for these combos?</p>
<p>Best</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 07 Aug 2008 02:55:54 +0300</pubDate>
        </item>
        <item>
        	<title>Jon on Dropdowns bind to a "text" value instead of a key value....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1430</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1430</guid>
        	        	<description><![CDATA[<blockquote>
<p>Hi Tony.&#160;When I supply the JSON data to the grid I send the dropdown text.&#160; When the user saves (I am using formedit -nice job BTW!) the value is sent back.&#160; It would be desirbale to not send the text but instead send teh value and have the form combo box bind to the value instead of the text.&#160; Hopefully that makes sense.</p>
</p>
<p>TIA</p>
<p>-Jon</p>
<p>tony said:</p>
<p><em>Jon,</em></p>
<p><em>What about keyvalue = text - I mean you can construct the dropdown to have the same values of key and text - If I understand right.</em></p>
<p><em>Regards</em></p>
<p><em>Tony</em></p>
</blockquote>
<hr />
]]></description>
        	        	<pubDate>Wed, 06 Aug 2008 19:18:11 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Dropdowns bind to a "text" value instead of a key value....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1395</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1395</guid>
        	        	<description><![CDATA[<p>Jon,</p>
<p>What about keyvalue = text - I mean you can construct the dropdown to have the same values of key and text - If I understand right.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 05 Aug 2008 01:42:05 +0300</pubDate>
        </item>
        <item>
        	<title>Jon on Dropdowns bind to a "text" value instead of a key value....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1389</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/dropdowns-bind-to-a-text-value-instead-of-a-key-value#p1389</guid>
        	        	<description><![CDATA[<p>.... but post to the server as a key value.</p>
</p>
<p>Hi All,</p>
<p>When binding to a dropdown list my data has to contain the text of the dropdown versus the value of the dropdown.&#160; When the form posts back to the server it contains the value not the text.&#160; Anyway dropdowns can bind to the value instead of the text?&#160; or at least have a switch?&#160; I understand wanting both but the current implmentation mixes them together.</p>
<p>(Again I am total n00be!)</p>
<p>TIA</p>
<p>-Jon</p>
]]></description>
        	        	<pubDate>Mon, 04 Aug 2008 20:50:49 +0300</pubDate>
        </item>
</channel>
</rss>