I have a Grid with some columns in it, one of the columns contains a button I only want to be visible during editing of the row. I have set the column by default to hidden: true. This work fine the grid renders and the column is not there. Inside the RowEditing plug-In i have wired up the beforeedit event and have added code to display the column (setHidden(false)). The issue is when I put this code in here to display the column the first time the user double clicks on the row to edit it simply shows the column and never goes into edit mode. You have double click the same row again to finally begin the edit process. Here is the code below any idea's?
Sencha ExtJS RowEditing beforeEdit Unhide column does not begin edit
Code:
Ext.create('Ext.grid.plugin.RowEditing', { clicksToMoveEditor: 1,
autoCancel: true,
listeners:
{
beforeedit: function( editor, context, eOpts )
{
//if (Ext.ComponentQuery.query("#colStopOptions") != null && Ext.ComponentQuery.query("#colStopOptions") != undefined && Ext.ComponentQuery.query("#colStopOptions").length > 0)
//{
Ext.ComponentQuery.query("#colStopOptions")[0].setHidden(false);
//}
},
canceledit: function( editor, context, eOpts )
{
if (Ext.ComponentQuery.query("#colStopOptions") != null && Ext.ComponentQuery.query("#colStopOptions") != undefined && Ext.ComponentQuery.query("#colStopOptions").length > 0)
{
Ext.ComponentQuery.query("#colStopOptions")[0].setHidden(true);
}
},
edit: function( editor, context, eOpts )
{
if (Ext.ComponentQuery.query("#colStopOptions") != null && Ext.ComponentQuery.query("#colStopOptions") != undefined && Ext.ComponentQuery.query("#colStopOptions").length > 0)
{
Ext.ComponentQuery.query("#colStopOptions")[0].setHidden(true);
}
}
}
});
Sencha ExtJS RowEditing beforeEdit Unhide column does not begin edit
Aucun commentaire:
Enregistrer un commentaire