This is a migrated thread and some comments may be shown as answers.

Put row in edit mode when row is clicked

1 Answer 1247 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 01 Mar 2017, 12:46 PM
I'm using inline editing in my Grid. However, instead of requiring the user to scroll all the way over to the right and click the Edit button, I'd like to allow them to simply click a row to put the row in edit mode. Can this be done?

1 Answer, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 02 Mar 2017, 04:56 PM
Hi Randy,

The described functionality can be achieved if you enable Grid selection and use the change handler to enter edit mode.

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-selectable

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-change

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-editRow


editable: "inline",
selectable: true,
change: function(){
  this.editRow(this.select());
}

Additionally, you can check the above functionality in this sample Dojo example.

Depending on the exact implementation and approach, the grid may end up always being in edit mode. This is because the Cancel button is part of the same row thus, it triggers the editing again.

For a more flexible behavior, you may need to resort to a custom click handler that is not tied to built-in Grid functionality.

I hope the above information helps.

Regards,
Preslav
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Randy
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Share this question
or