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

Delete Confirmation Dialog

2 Answers 489 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 16 Aug 2017, 03:20 AM

Hello,

Is there a way to add a confirmation popup via a script of the standard grid delete button on the far right of the row.  I tried to call a javascript function from the OnDeleteCommand of the grid which creates a confirmation and continue on to the event if true.  I couldn't get this to work however it didn't seem to like calling javascript from the control event.  Any help appreciated.

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 18 Aug 2017, 06:26 AM
Hello Chris,

RadGrid already provides confirmation functionality. You can use GridButtonColumn to achieve this requirement automatically:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/delete-records/adding-a-delete-confirmation

In addition, I am also attaching a sample RadGrid web site to demonstrate more advanced implementation. 

Alternatively, if you want to implement a custom approach, you can use GridTemplateColumn and place a Button in its ItemTemplate.

If you want to delete the row only visually on the client, you can use a GridClientDeleteColumn.

I hope this will prove helpful.


Regards,
Eyup
Progress Telerik
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.
0
Chris
Top achievements
Rank 1
answered on 18 Aug 2017, 08:53 AM
Eyup - that's exactly what I was after.
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Chris
Top achievements
Rank 1
Share this question
or