$("#Contract").kendoGrid({
columns: [
{
field: "SomeField",
}],
editable: true,
scrollable: true,
navigatable: true,
selectable: "cell"
How do I make the cell selected when users click on a cell?
I saw a demo at http://demos.telerik.com/aspnet-mvc/razor/grid/editingbatch and wanted to do the same but I could not figure which setting is needed. For editable setting, I tried 0,1,and 2 but it does not seem to work like telerik grid.
4 Answers, 1 is accepted
I would suggest you to take a look at the following Kendo UI Grid demos about Batch editing and Selection.
Please let me know if they were helpful for you or I could assist you further. I wish you a great day!
Regards,
Dimiter Madjarov
Telerik
Hi Dimiter, I'm not getting it b/c I cannot see how the reference to Batch editing and multi-cell selection answer the question that Autobytel asked.
I have the same question. In the absence of a drag-and-fill capability in batch editing, our users need a more efficient method to copy/paste. If a user clicks in a cell AND the existing value is automatically selected/highlighted, then users can simply paste (ctrl-v) a new value and move on. Currently, it doubles their effort to click the cell, select or clear the existing value, and then do their paste.
Any suggestions you have is greatly appreciated - Thanks!
Hello Tom,
In the current you could attach a handler to the Grid's edit event
.Events(e => e.Edit(
"onEdit"
))
The following forum post demonstrates two possible scenarios and implementations - when using an input field or a Kendo Widget as an editor.
Regards,
Dimiter Madjarov
Telerik
For anyone else who reads this. I added the event exactly like Dimiter said - that works. But I made the onEdit JavaScript function a little different than the example. The example was looking for a specific field. I made the JavaScript select any field.
Here's my JavaScript code. If anyone see's a better way of doing this, then please let me know.
function onEdit(e) {
var inputName = e.container.find('input').attr("name");
var myInput = e.container.find('input[name="' + inputName + '"]');
myInput.select();
}