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

Inline editing buttons without create command.

1 Answer 186 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 20 Dec 2012, 07:34 PM
Hi,

I have a grid that has a column with a destroy button but no create button. I want the user to be able to delete or add new records but not change them. The problem is the grid won't create the update and cancel buttons because it is looking for a create button in my command column. I fixed it by changing the line looking for the create column to this:


command = getCommand(column.command, "edit") || getCommand(column.command, "destroy");

Is there a better way to do this without modifying the kendo code? Or could this be added in an upcoming release so I don't have to modify the code again when updating?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 24 Dec 2012, 12:17 PM
Hello Chris,

 In inline mode the Kendo Grid needs a column where to put the insert and cancel buttons. This is currently done by looking for a column that contains an "edit" command. 

 Modifying this is one way to do what you need however we are not sure we can implement it as a built-in feature. Imagine the case when the grid has two columns - one with "destroy" command and one with "edit" command. If we used the updated code the "insert" and "cancel" buttons would be created in the first column (which contains  the "destroy" command) instead of the second.

In cases when the user wants to allow only record creation we recommend using a different editing mode such as popup and incell.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or