In modern toolkit extjs, how to make a grid cell editable on single click? I tried using clickToEdit: 1, as in classic version. But this doesn't work in modern. Can anyone suggest me on this.! Thanks!
Asked
Active
Viewed 553 times
1 Answers
1
You can use 'triggerEvent' property in the 'gridcellediting' plugin config. Something like this:
plugins: {
gridcellediting: {
triggerEvent: 'tap', // edit on one click/tap
selectOnEdit: true
}
}

Arthur Rubens
- 4,626
- 1
- 8
- 11
-
Hi Arthur, I'm setting a editor for grid cells using childtap method, (childtap: this.onBeforeEditProperty). This doesn't seem to work properly after adding triggerEvent:'tap', what can i do for this? – Preethi Shettigar Feb 02 '21 at 12:47
-
Hi @PreethiShettigar, I cannot help you without some fiddle sample or code. I also do not understand exactly what you mean by saying "This doesn't seem to work properly". – Arthur Rubens Feb 02 '21 at 12:59
-
I have added a childtap listener for the grid like this, listeners:{ scope:this, childtap: this.onBeforeEditProperty } In 'onBeforeEditProperty' method i am setting editor for the clicked cell, ,onBeforeEditProperty: function(editor, context, eOpts){ var col = context.column; var t = tr.get('type'); var te = App.getTypeEditor(t, context); if(te) { col.setEditor(te); } } } After adding triggerEvent:'tap', editor doesn't get set. – Preethi Shettigar Feb 02 '21 at 13:18
-
@PreethiShettigar why did not you use 'editor' property of the Ext.gird.column.Column class? Something like this: { text: 'Date Of Birth', dataIndex: 'dateOfBirth', flex: 1, // Turn on Cell Editing editable: true, editor: 'datefield' // Date field editor } – Arthur Rubens Feb 02 '21 at 13:33
-
For my application, i need different editor's for different cells, in same column. So have to set editor in beforeeditproperty. I have different cells with textfield, datefield within same column. – Preethi Shettigar Feb 02 '21 at 13:37
-
Then provide some fiddle.sencha.com sample. Some trivial grid and I will try to help you with this issue. – Arthur Rubens Feb 02 '21 at 13:43