1
votes

I'm trying to edit the Gridpanel with the combobox items. When I try selecting a value to edit and click on the other cell the value field appears in the cell as seen in the image attached, I want to display the description of the items and keep the valueField hidden from appearing . How would I be able to show the description always and edit,update the panel. knowing that I can update the data with the id(valueField which is appearing in the second part of image) only.

please help. thanks in advance.

Small piece of that grid

{
            header: 'Field Time Distrib',
            xtype: 'gridcolumn',
            dataIndex: 'feild_distributor',
            flex: 1,
            editor: {
                xtype: 'combobox',
                allowBlank: true,
                displayField: "description",
                valueField: "distribsrcid",
                queryMode: 'local',
                mapperId: 'getfeildDistrib',
                lastQuery: '',
                forceSelection: true,               
                listeners: {
                    expand: function () {
                        var call = this.up('timegrid[itemId=feilddTimeGrid]').getSeletion().selection.record.data.fieldname.trim();
                        this.store.clearFilter();
                        this.store.filter({
                            property: 'call',
                            value: call,
                            exactMatch: true
                        })
                    }
                }
            }
        }

this is the small screen shot

1
not able to see the images. - Surya Prakash Tumma
@SuryaPrakashTumma updated...!!!!!!!! - user7569898
@SuryaPrakashTumma Can you please look into this too!!! Here.... - user7569898
In my example it is not clearing right - Surya Prakash Tumma
@SuryaPrakashTumma yes but it allows to add any values right?? that I want to restrict it. User should be able to select the values from the combo box itself. - user7569898

1 Answers

1
votes

One solution I can suggest you , Use renderer function of column identify if it is number ,If number get the respective name from the store and return the name ... check my fiddle. check the fiddle for my example