PDA

View Full Version : EditorGridPanel can't be edited



WhirlingDerBing
17 Sep 2009, 9:52 AM
I've got an EditorGridPanel that I am using inside a FormPanel. When I double-click the cells in the editor grid nothing happens. I've tried specifying the "clicksToEdit" config option explicitly but it didn't make any difference. Here is my code:


xtype: 'editorgrid', // Grid for displaying/managing list of CIDs
fieldLabel: 'CID(s)',
stipeRows: true,
store: cidStore,
height: 70,
width: 222,
columns:[
{header: 'CID', dataIndex: 'cid'},
{header: 'Description', dataIndex: 'description'}
]This code is nested within several layers of containers. They are as follows: Window -> TabPanel -> Tab -> FormPanel. The above code is inside the "items" config of the FormPanel. If anyone has any thoughts on why this EditorGrid can't be edited I'd greatly appreciate your input.

WhirlingDerBing
17 Sep 2009, 12:16 PM
I found the solution to my problem. It turns out I had forgotten to define an editor for each field in the column model. Below is my updated code which works (the changes are in bold):


xtype: 'editorgrid', // Grid for displaying/managing list of CIDs
fieldLabel: 'CID(s)',
stipeRows: true,
store: cidStore,
height: 70,
width: 222,
columns:[
{header: 'CID', editor: new Ext.form.TextField(), dataIndex: 'cid'},
{header: 'Description', editor: new Ext.form.TextField(), dataIndex: 'description'}
]