-
2 Feb 2012 7:45 AM #1
Answered: Select all text in text edtior
Answered: Select all text in text edtior
I have a basic grid that uses the cellediting plugin and the editors specified for the different columns are of type textfield. What i want to do is when a editor is opened the text in it to be selected. Any ideas ?
-
Best Answer Posted by friend
In your textfield config, you can also specify:
Code:{ xtype: 'textfield', selectOnFocus: true }
-
2 Feb 2012 9:22 AM #2
You need to listen for the field focus event to select the text.
Code:listeners:{focus: function(e, opts){e.selectText(); return true;}}
-
2 Feb 2012 10:22 AM #3
In your textfield config, you can also specify:
Code:{ xtype: 'textfield', selectOnFocus: true }


Reply With Quote