<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title>Extjs grid combo box. in Webmasters and Developers</title>
<link>http://www.dslreports.com/forum/r20794597</link>
<description></description>
<language>en</language>
<pubDate>Wed, 11 Nov 2009 03:52:44 EDT</pubDate>
<lastBuildDate>Wed, 11 Nov 2009 03:52:44 EDT</lastBuildDate>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20806787</link>
<description><![CDATA[<A HREF="/useremail/u/825167"><b>johnnyboyct</b></A> : Haha, I got so frustrated I really cant look at that god damn thing lol. <br><br>I SOOOOOO appreciate the post, it looks like its going to work. Sounds like basically the same thing. For a work around I made it post the actual text and did a lookup on that :( <br><br>Ill let you know when my eyes stop bleeding lol.<br><br>John<br><small>--<br><A HREF="http://www.MilestoneMultimedia.com">Connecticut  Web Design and Development</a></small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20806787</guid>
<pubDate>Thu, 17 Jul 2008 14:51:22 EDT</pubDate>
</item>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20806680</link>
<description><![CDATA[<A HREF="/useremail/u/488582"><b>PToN</b></A> : So did it work....?  You are killing me man... I need to know...!]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20806680</guid>
<pubDate>Thu, 17 Jul 2008 14:36:27 EDT</pubDate>
</item>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20800015</link>
<description><![CDATA[<A HREF="/useremail/u/488582"><b>PToN</b></A> : Ok the way i did it was to get the ID within the datastore and then use the hidden value property to post a different value than the one displayed..<br><br>Here is that i did:<br><textarea name="code" class="text" cols=50 rows=10>//*************** Data from DataBase to create Parts combo box&#012;var dataRecordParts = new Ext.data.Record.create(&#91;&#012;{name: 'PartNumber'},&#012;{name: 'PartNumberID'}&#012;&#93;);&#012; &#012;var dataReaderParts = new Ext.data.JsonReader({&#012;root: 'results'&#012;},&#012;dataRecordParts&#012;);&#012; &#012;var dataProxyParts = new Ext.data.HttpProxy({&#012;url: '../../../index.php/listboards/quePart',&#012;method: 'POST'&#012;});&#012; &#012;var dataStoreParts  = new Ext.data.Store({&#012;proxy: dataProxyParts,&#012;reader: dataReaderParts,&#012;sortInfo: {field: "PartNumber", direction: "ASC"}&#012;});&#012; &#012;var parts = new Ext.form.ComboBox({&#012;store: dataStoreParts,&#012;fieldLabel: 'Part Number', &#012;displayField:'PartNumber',&#012;valueField: 'PartNumberID',&#012;hiddenName: 'PartNumberID',&#012;allowBlank: false,&#012;pageSize: 5,&#012;minChars: 2,&#012;    hideTrigger: true,&#012;typeAhead: true,&#012;mode: 'remote', &#012;triggerAction: 'all', &#012;emptyText: 'Select a Part...', &#012;selectOnFocus: false,&#012;width: 260&#012;});&#012;</textarea><!--end code block--><br>My data record has: partn and partnID, which for you it would be value=partnID and text=partn.<br><br>Then look at my combo box: i used the Display property to show the "text" and the valueField and the hiddenName properties to post the "value" or in my specific case the partnID.<br><br>You must use the valueField and hiddenName together. For some reason i could not get it to work.... This should work for you. NOTE: that my combo-box is in a formPanel and not a Editable Grid, but i dont think it should make a difference..<br><br>Let me know..<br>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20800015</guid>
<pubDate>Wed, 16 Jul 2008 12:01:52 EDT</pubDate>
</item>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20799947</link>
<description><![CDATA[<A HREF="/useremail/u/488582"><b>PToN</b></A> : i  believe i have the answer for you... :) =D<br><br>let me look at my code, be back in a few]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20799947</guid>
<pubDate>Wed, 16 Jul 2008 11:53:03 EDT</pubDate>
</item>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20799933</link>
<description><![CDATA[<A HREF="/useremail/u/825167"><b>johnnyboyct</b></A> : I have the grid with a select box in the column. Its like this:<br><br>value=2 text=pounds<br>value=3 text=feet<br><br>So they would be selecting the text pounds, but it should post the value 2.<br><br>(priority was unit, but Ive beens crewing around with it lol)<br><small>--<br><A HREF="http://www.MilestoneMultimedia.com">Connecticut  Web Design and Development</a></small><div class="borderless"><TABLE WIDTH=95% align=center border=0 CELLPADDING=4"><TR><TD ALIGN=CENTER VALIGN=CENTER BGCOLOR=#FFFFFF nwrap COLSPAN=3 WIDTH=100%><A HREF="/speak/slideshow/20799933?c=1328582&ret=L2ZvcnVtL3IyMDc5NDU5Ny54bWw%3D"><IMG class="apic" BORDER=0 TITLE="16878 bytes" WIDTH=600 HEIGHT=136 SRC="/r0/download/1328582.thumb600~04221da1a4e2090cfb5ba2214519f4c6/gr.jpg/thumb.jpg" ALT="Click for full size"></A></TD></TABLE></div>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20799933</guid>
<pubDate>Wed, 16 Jul 2008 11:51:20 EDT</pubDate>
</item>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20799901</link>
<description><![CDATA[<A HREF="/useremail/u/488582"><b>PToN</b></A> : Let me see if i get this right:<br>So you want to have a combo-box with: val1, val2, val3 and you have an empty text-box.<br><br>When you select val2 from the combo box, you want to store val2 into the datastore and display it in the text-box...<br><br>Did i get it right...?]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20799901</guid>
<pubDate>Wed, 16 Jul 2008 11:44:58 EDT</pubDate>
</item>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20794741</link>
<description><![CDATA[<A HREF="/useremail/u/825167"><b>johnnyboyct</b></A> : <textarea name="code" class="text" cols=50 rows=10>&lt;catalog&gt;&#012;&lt;plant&gt;&#012;&lt;id&gt;-1&lt;/id&gt;&#012;&lt;description&gt;Product Description&lt;/description&gt;&#012;&lt;spec_value/&gt;&#012;&lt;unit_id&gt;1&lt;/unit_id&gt;&#012;&lt;unit_name&gt;Pounds&lt;/unit_name&gt;&#012;&lt;spec_description_id&gt;1&lt;/spec_description_id&gt;&#012;&lt;/plant&gt;&#012; &#012;&lt;plant&gt;&#012;&lt;id&gt;-1&lt;/id&gt;&#012;&lt;description&gt;Overall Dimensions&lt;/description&gt;&#012;&lt;spec_value/&gt;&#012;&lt;unit_id&gt;1&lt;/unit_id&gt;&#012;&lt;unit_name&gt;Pounds&lt;/unit_name&gt;&#012;&lt;spec_description_id&gt;3&lt;/spec_description_id&gt;&#012;&lt;/plant&gt;&#012; &#012;&lt;/catalog&gt;&#012;</textarea><!--end code block--><br><small>--<br><A HREF="http://www.MilestoneMultimedia.com">Connecticut  Web Design and Development</a></small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20794741</guid>
<pubDate>Tue, 15 Jul 2008 13:34:08 EDT</pubDate>
</item>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20794733</link>
<description><![CDATA[<A HREF="/useremail/u/825167"><b>johnnyboyct</b></A> : Ive done everything I can think of lol. <br><br>What Im trying to do is have it pull from the xml, which is working, i get the correct one selected, but when you change it, have the value go into the store and the text go into the box. <br><br>I can post the sample xml Im using too if that helps :)<br><br>I know its possible, I just cant get it to work for the life of me :(<br><br>Heres what I settled on, i gave up for a while (line 155)lol:<br><textarea name="code" class="text" cols=50 rows=10>&lt;div id="binding"&gt;&lt;/div&gt;    &#012;&lt;script type="text/javascript"&gt;&#012;Ext.onReady(function(){&#012;    Ext.QuickTips.init();&#012; &#012;    // shorthand alias&#012;    var fm = Ext.form;&#012;    &#012; &#012; &#012;    &#012; &#012;    // the column model has information about grid columns&#012;    // dataIndex maps the column to the specific data field in&#012;    // the data store (created below)&#012;    var cm = new Ext.grid.ColumnModel(&#91;{&#012;           id:'id',&#012;           header: "ID",&#012;           dataIndex: 'id',&#012;           width: 50,&#012;           hidden: true,&#012;           editor: new fm.TextField({&#012;               allowBlank: true&#012;           })&#012;        },&#012;        {&#012;           &#012;           header: "Description",&#012;           dataIndex: 'description',&#012;           width: 220,&#012;           editor: new fm.TextField({&#012;               allowBlank: false&#012;           })&#012;        },{&#012;header: 'Priority',&#012;width:100,&#012;sortable:true,&#012;dataIndex: 'unit_name',&#012; &#012;editor: new Ext.grid.GridEditor(&#012;new Ext.form.ComboBox(&#012;{&#012;typeAhead:true,&#012;triggerAction:'all',&#012;lazyRender:true,&#012;transform:'light'&#012;}&#012;)&#012;)&#012;},&#012;        {header: "spec_description_id", width: 0, sortable: true, hidden: true},&#012;        {header: "Actions", width:100, sortable:false, hidden:false, dataIndex: 'id',&#012;        renderer: function() {&#012;    return '&lt;div class="controlBtn"&gt;&lt;img src="http://localhost/js/ext/icons/fam/delete.gif" width="16" height="16" class="control_delete"&gt;&lt;/div&gt;';&#012;}&#012; &#012;                &#012;                &#012;                &#012;                &#012;                &#012;},{&#012;           header: "Value",&#012;           dataIndex: 'spec_value',&#012;           width: 200,&#012;           editor: new fm.TextField({&#012;               allowBlank: true&#012;           })&#012;        }&#012;        &#012;    &#93;);&#012; &#012;    &#012;    &#012;    // by default columns are sortable&#012;    cm.defaultSortable = true;&#012; &#012;    // this could be inline, but we want to define the Plant record&#012;    // type so we can add records dynamically&#012;    var Plant = Ext.data.Record.create(&#91;&#012;           {name: 'id'},&#012;           {name: 'description'},&#012;           {name: 'unit_name'},&#012;           &#012;           {name: 'spec_value'},&#012;           {name: 'spec_description_id'}&#012;           &#012;      &#93;);&#012; &#012;    // create the Data Store&#012;    var store = new Ext.data.Store({&#012;        &#012;        proxy: new Ext.data.HttpProxy({&#012;method: 'GET',&#012;disableCaching:true,&#012;url: "http://localhost/index.php?c=ajax_grid&amp;m=get_specs&amp;pid=4&amp;wid=100"&#012;}),&#012; &#012;        // the return will be XML, so lets set up a reader&#012;        reader: new Ext.data.XmlReader({&#012;               // records will have a "plant" tag&#012;               record: 'plant'&#012;           }, Plant),&#012; &#012;        remoteSort:true&#012;    });&#012; &#012;    // create the editor grid&#012;    var grid = new Ext.grid.EditorGridPanel({&#012;        store: store,&#012;        cm: cm,&#012;        renderTo: 'binding',&#012;        width:800,&#012;        height:500,&#012;        title:'Specs',&#012;        frame:true,&#012;        clicksToEdit:1,&#012; &#012;        tbar: &#91;{&#012;            text: 'Add',&#012;            handler : function(){&#012;                var p = new Plant({&#012;       id:-1,&#012;       description:'',&#012;       unit_name:'',&#012;       spec_value:''&#012; &#012;                });&#012;                grid.stopEditing();&#012;                store.insert(0, p);&#012;                grid.startEditing(0, 0);&#012;            }&#012;        },{&#012;            text:'Submit',&#012;            handler : function() { &#012;  var json = '';&#012;  store.each(function(store){&#012;      json += Ext.util.JSON.encode(store.data) + ',';&#012;  });&#012;  json = json.substring(0, json.length - 1);&#012;  Ext.getDom('GridData').value = json&#012;    document.gridform.submit();&#012;}&#012;}&#012;        &#012;        &#012;        &#93;&#012;    });&#012;    store.load();&#012;    &#012;    &#012;    &#012;    &#012;    grid.on('afterEdit', function(e){//listening for the grid's 'validateedit' event&#012;//Left here becuse this grid makes me want to kill myself    &#012;console.log(e.field + ' ' + e.value + ' ' + e.record.data&#91;'unit_name'&#93; + ' ' + e.value);&#012; &#012;//e.record.set(e.field, 123)&#012;  &#012;});&#012;    &#012;    &#012;    &#012;    grid.on('click', function(e) {&#012; &#012;        var btn = e.getTarget('.controlBtn');        &#012; &#012;        if (btn) {&#012; &#012;            var t = e.getTarget();&#012; &#012;            var v = this.view;&#012; &#012;            var rowIdx = v.findRowIndex(t);&#012; &#012;            var record = this.getStore().getAt(rowIdx);            &#012; &#012;            var control = t.className.split('_')&#91;1&#93;;&#012; &#012;            switch (control) {&#012; &#012;                case 'delete':&#012;                store = grid.getStore();&#012;store.remove(record)&#012;                    console.log('edit this record - ' + record.id);&#012; &#012;                    break;&#012; &#012;            }            &#012; &#012;        }&#012; &#012;    }, grid); &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012;    &#012; &#012;    &#012;    &#012;    &#012;    &#012;});&#012; &#012;&lt;/script&gt;&#012; &#012;    &lt;form action="http://localhost/index.php/Ajax_grid/gridpost" method="post" class="form" id="gridform" name="gridform"&gt;&lt;input type="hidden" name="GridData" id="GridData" value=""  style="display: none;"  /&gt;&lt;input type="hidden" name="pid" value="4" /&gt;&lt;input type="hidden" name="wid" value="100" /&gt;&lt;select name="light" id="light" style="display:none"&gt;&lt;option value="3"&gt;Feet&lt;/option&gt;&lt;option value="4"&gt;Foot Pounds&lt;/option&gt;&lt;option value="2"&gt;LBS per Square Inch&lt;/option&gt;&lt;option value="5"&gt;NONE&lt;/option&gt;&lt;option value="1"&gt;Pounds&lt;/option&gt;&lt;/select&gt;&lt;/form&gt;&#012;</textarea><!--end code block--><br><small>--<br><A HREF="http://www.MilestoneMultimedia.com">Connecticut  Web Design and Development</a></small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20794733</guid>
<pubDate>Tue, 15 Jul 2008 13:32:50 EDT</pubDate>
</item>

<item>
<title>Re: Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20794706</link>
<description><![CDATA[<A HREF="/useremail/u/488582"><b>PToN</b></A> : Are you trying to populate the combo box from a DB..?<br><br>Try to mimic the example &raquo;<A HREF="http://extjs.com/deploy/dev/examples/grid/edit-grid.js" >extjs.com/deploy/dev/examples/gr&middot;&middot;&middot;-grid.js</A><br><br>What's not working..? Do you get the combo box..? Do you get it, but it shows no data..?]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20794706</guid>
<pubDate>Tue, 15 Jul 2008 13:27:15 EDT</pubDate>
</item>

<item>
<title>Extjs grid combo box.</title>
<link>http://www.dslreports.com/forum/remark,20794597</link>
<description><![CDATA[<A HREF="/useremail/u/825167"><b>johnnyboyct</b></A> : Wow this thing is making me SoOooOooo mad. I originally tried it on someone heres advice, anything to add? Just wondering if maybe you have run into this same deal :(<br><br>&raquo;<A HREF="http://extjs.com/forum/showthread.php?p=195024" >extjs.com/forum/showthread.php?p=195024</A><br><small>--<br><A HREF="http://www.MilestoneMultimedia.com">Connecticut  Web Design and Development</a></small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20794597</guid>
<pubDate>Tue, 15 Jul 2008 13:00:31 EDT</pubDate>
</item>

</channel>
</rss>
