View Full Version : ExtJs Combo box default value(label-value pair) to be set dynamically

22 Jun 2011, 4:42 AM
Hi All,
Am using editable grid,in which i have to load the data s dynamically.I can set the values for text-fields and can't set values for editable combo's in grid. But i have data s in combo store,i have to set first item(label-value pair) as default value, but if you click the combo then the values are available in store.

In nutshell, i need to set default value in editable combo while rendering a grid.But i can get the data s after grid get's loaded.

For Eg:
var itemInfoArray = new Array();
for(var i =0 ;i<objData.length; i++){
var itemArray = new Array(objData[i].data['ItemsName'],objData[i].data['ItemId']);

ItemsNameCombo - store

Here i have attached my screen shot.In that ItemsName and BatchNo are editable combo's

Thanks All

22 Jun 2011, 8:47 PM
Seems you are setting the displayfield instead of valuefield for the combo. You can write the column renderer and within it you have to access the column editor store and set proper valuefield for the editor store so as to reflect the same within the grid.