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

How to add edit and delete buttons to row template

2 Answers 1016 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy Hompesch
Top achievements
Rank 1
Randy Hompesch asked on 24 Jul 2019, 05:34 PM

Hi,

How can I add the default edit and delete buttons to a grid row template?

Thanks … Ed

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 26 Jul 2019, 04:19 PM
Hello Ed,

You can inspect the rendered HTML on the built-in buttons and copy it over to your template. Here's an example I made for you: https://dojo.telerik.com/@bratanov/OWakUxUl. A couple of key pointers:

  • the <tr> element of the row template must provide the uid of the record. The grid needs it to know which model you're editing
  • note the escaping of the symbols if you define the templates in another fashion (e.g., in C#)
  • there must be a command column defined so the grid looks for the HTML it normally uses on the buttons

 


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Randy Hompesch
Top achievements
Rank 1
answered on 28 Jul 2019, 02:06 PM
Beautiful! Thanks.
Tags
Grid
Asked by
Randy Hompesch
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Randy Hompesch
Top achievements
Rank 1
Share this question
or