2
votes

I want to add more than one editor config for a grid column.

For example, I want to see textbox for first cell and combo box for second cell.

Is there any way to implement this?

Thanks in advance. Deepak

2

2 Answers

2
votes

You do not need to use two..Just use xtype for grid columns... e.g;

{
header:'textfield column',
editor:{
xtype:'textfield',
allowBlank:false
}
},
{
header:'combo column',
editor:{
xtype:'combo',
}
}

And ofcourse you need to declare the plugin in the grid config,like...

plugins: [
          Ext.create('Ext.grid.plugin.RowEditing', {
            clicksToEdit: 2
          })
      ]
1
votes

You will need to override the getEditor function in your Ext.grid.plugin.CellEditing plugin to allow for using a different editor based on the data in the record. Look at the answer in this post, it has a good example of how to do this: ExtJS 4, Different rows fields