3 Answers, 1 is accepted
0
Hi Sam,
You can achieve this requirement using the editCell method provided by the grid. You can find a similar sample here:
https://docs.telerik.com/kendo-ui/knowledge-base/grid-edit-cell-on-double-click
And if you want to achieve the same for other edit modes, you can use the approach demonstrated here:
https://docs.telerik.com/kendo-ui/knowledge-base/grid-open-edit-popup-on-double-click-of-row
I hope this will prove helpful.
Regards,
Eyup
Progress Telerik
You can achieve this requirement using the editCell method provided by the grid. You can find a similar sample here:
https://docs.telerik.com/kendo-ui/knowledge-base/grid-edit-cell-on-double-click
And if you want to achieve the same for other edit modes, you can use the approach demonstrated here:
https://docs.telerik.com/kendo-ui/knowledge-base/grid-open-edit-popup-on-double-click-of-row
I hope this will prove helpful.
Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sam
Top achievements
Rank 1
answered on 16 Aug 2018, 09:10 AM
Hi Eyup,
Thanks. Now I'm able to enable editable field by double click.
We are planning to enable editable field also on any valid character key press and want to retain the pressed character in the editable field. But this is not achievable since it takes some time to render editable field. Please guide us if we can do this in any other way.
Thanks in advance,
Sam Azpan. D
0
Hi Sam,
This may be possible to achieve based on the field editors that you have. If all columns in your Grid are strings and you have simple text editors, you can try the following:
1. When you capture the key press event and check what letter was pressed, save this letter in a variable that is accessible to the Grid event handler functions.
2. Add an edit event handler to the Grid. When you call editCell to make the cell editable, this event will be raised jut before showing the cell content.
3. In the edit event handler, you can search for the edited input and set its value to the letter that you previous saved:
If you have other editors like DatePickers or NumericTextBoxes, you will need to run additional checks to know what type of editor you need to be setting the current value to.
Regards,
Tsvetina
Progress Telerik
This may be possible to achieve based on the field editors that you have. If all columns in your Grid are strings and you have simple text editors, you can try the following:
1. When you capture the key press event and check what letter was pressed, save this letter in a variable that is accessible to the Grid event handler functions.
2. Add an edit event handler to the Grid. When you call editCell to make the cell editable, this event will be raised jut before showing the cell content.
3. In the edit event handler, you can search for the edited input and set its value to the letter that you previous saved:
function
onEdit(e){
var
input = e.container.find(
"input.k-textbox"
);
input.val(savedLetter);
input.trigger(
"change"
);
// if you want the value to be immediately reflected in the underlying data item
}
If you have other editors like DatePickers or NumericTextBoxes, you will need to run additional checks to know what type of editor you need to be setting the current value to.
Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.