It took me a while to figure this out, so I thought a post here about it wouldn't hurt. I really think this should be a parameter in the grid.
In my version (2012.2.710.340), when Im editing a cell, the marker places itself on position 0, before the value. Because of this, the user has to manually select and delete the value of the textbox before entering anything. Since we're all a bunch of lazy bastards, this just won't work :). When I click a cell, I want the value to be selected, so that I just start typing to replace it.
To achive this, just add a hook on the "edit"-event like this.
In my version (2012.2.710.340), when Im editing a cell, the marker places itself on position 0, before the value. Because of this, the user has to manually select and delete the value of the textbox before entering anything. Since we're all a bunch of lazy bastards, this just won't work :). When I click a cell, I want the value to be selected, so that I just start typing to replace it.
To achive this, just add a hook on the "edit"-event like this.
<script type=
"text/javascript"
>
$(
function
() {
// get a reference to the grid
var
grid = $(
"#@gridname"
).data(
"kendoGrid"
);
grid.bind(
"edit"
,
function
(e) {
e.container.find(
"input"
).select();
});
});
</script>