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

Inline Create and Delete but Disable Edit

2 Answers 306 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 06 Feb 2015, 06:24 AM
I'm trying to set up a grid similar to the one you have in the demos. However, I only want to allow users to create new entries or delete existing entries. I've tried removing "edit" as an option, set editable: { update: false } in the configuration, and have not yet found a way to achieve my goal. Each of these attempts typically results in the newly added row (for a new entry) showing only the Delete button. The Update and Cancel buttons are not shown.

I finally noticed this thread discussing how to remove buttons in the onDataBound event, and I was able to get this to work: http://dojo.telerik.com/UhATo. Is that a good approach, or do you recommend a better way?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 06 Feb 2015, 03:10 PM

Hello Ryan,

Yes, the approach is correct. Another option would be to remove the edit command and manually inject the required markup for the update/cancel command when an item is created.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
krishnaveni
Top achievements
Rank 1
answered on 08 May 2019, 05:19 PM

.k-grid-edit {
            display: none;
        } 

add this to css,it will hide the Edit button,will show update and cancel buttons.

Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
krishnaveni
Top achievements
Rank 1
Share this question
or