Note that there are some explanatory texts on larger screens.

plurals
  1. POExt JS Combobox inside a grid
    primarykey
    data
    text
    <p>In reference with <a href="http://www.walkingtree.in/forums/showthread.php?439-Combobox-inside-a-grid-setting-default-value" rel="nofollow">Combobox inside a grid</a> example. I was able to do this in my page. problem is, when i change the value in one of the combobox, the rest of the combobox in the same row also change, they all have the same value. </p> <p>I'm using only a javascript and basic html and ext js with this. I'm using ext sandbox (ext4). </p> <p>any help?</p> <pre><code>if(columnData != undefined){ for (var i = 0; i &lt; columnData.length; i++) { var storedata = []; for(var gr = 0;gr &lt; gridData.itemData[0][0].length;gr++){ storedata.push([(gr + 1),gridData.itemData[0][0][gr]]); } var comboRenderer = function(combo) { return function(value) { alert(value); alert(combo.valueField); var idx = combo.store.find(combo.valueField, value); if ( idx &lt; 0 ) { idx = 0; } var rec = combo.store.getAt(idx); return rec.get(combo.displayField); }; }; fields.push({name:columnData[i].name}); columns.push({text:columnData[i].name, width: 140, menuDisabled: true, sortable: false, align: 'center', forcefit: true, columns: [{ text: 0, draggable: false, hideable: false, flex: 1, width: 140, dataIndex: columnData[i].name, menuDisabled: true, sortable: false, align: 'center', editable: true, renderer: comboRenderer(new Ext4.form.ComboBox({ id: i.toString(), typeAhead: true, triggerAction: 'query', mode: 'queryMode', autoSelect : false, autoShow : true, emptyText : 'Select item', store: new Ext4.data.ArrayStore({ fields: ['id' + i, 'description' + i], data : storedata }), displayField:'description' + i, valueField: 'id' + i, forceSelection: false })), editor: new Ext4.form.ComboBox({ id: i.toString(), typeAhead: true, triggerAction: 'query', mode: 'queryMode', autoSelect : false, autoShow : true, emptyText : 'Select item', store: new Ext4.data.ArrayStore({ fields: ['id' + i, 'description' + i], data : storedata }), displayField:'description' + i, valueField: 'id' + i, forceSelection: false }) }] }); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload