Hi guys, I have this grid:
and I noticed that the delete action is called as soon as the user click on remove command, even if the confirmation popup is displayed.
I need to invoke the action only on the confirm from the user. I search a bit online but everyone is doing this with a custom popup.
I remember, however, that in another project I've done that automatically, but I wasn't using MVC back there.
Thanks
Fabio
@(Html.Kendo().Grid<Entity>(Model)
.Name(
"valueGrid"
)
.ToolBar(commands => commands.Create().Text(
"Add new value"
))
.Columns(columns =>
{
columns.Bound(c => c.DOMAINID).Visible(
false
);
columns.Bound(c => c.CODE);
columns.Bound(c => c.VALUE);
columns.Command(command => { command.Edit().UpdateText(
"Save"
); command.Destroy().Text(
"Delete"
); });
})
//.Events(e => e.SaveChanges("OnSaveChanges"))
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
//.Events(e => e.Error("OnDatasourceError"))
.ServerOperation(
false
)
.Model(m => m.Id(v => v.CODE))
.Update(update => update.Action(
"UpdateValue"
,
"DomainValue"
))
.Create(create => create.Action(
"CreateValue"
,
"DomainValue"
))
.Destroy(
delete
=>
delete
.Action(
"DeleteValue"
,
"DomainValue"
))
)
)
and I noticed that the delete action is called as soon as the user click on remove command, even if the confirmation popup is displayed.
I need to invoke the action only on the confirm from the user. I search a bit online but everyone is doing this with a custom popup.
I remember, however, that in another project I've done that automatically, but I wasn't using MVC back there.
Thanks
Fabio