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

Success message or not after deleting a row

3 Answers 787 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 24 Oct 2016, 10:28 AM

Can anyone help me how to get a notification message after deleting a row of a batch editing grid.

I need to show a success message or not after i click the ok button.

Please i hope you can help me with this issue.

3 Answers, 1 is accepted

Sort by
0
Eduardo Serra
Telerik team
answered on 24 Oct 2016, 04:16 PM
Hi Juan,

I encourage you to take a look at the Kendo UI Notification Overview to see how it could be implemented in your scenario.

Without knowing much about the particulars of your Grid, I think one viable option would be to show the notification in the requestEnd event of the DataSource; there, you can check if the current request is to destroy and implement your custom logic:

requestEnd: function(e) {
    if(e.type == "destroy")
    {
        //your custom logic
    }
}

I hope this helps.

Regards,
Eduardo Serra
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
0
Juan
Top achievements
Rank 1
answered on 24 Oct 2016, 06:54 PM

Hi Eduardo, thanks for your help!

Now i have another issue.

When i catch an exception like integrity constraint on my controller , i want to show a message error that the record could not be deleted.

Any idea of how can i do that?.

I want to do something like this:

if (e.type == "destroy") {
                $("#showSucces").show();
                $("#showDanger").hide();
                $("#showSucces").fadeIn(2000).delay(7000).fadeOut(1000);
            } --> this in case that the row was successful deleted.

And now i want to show the error message in case that the record was unsuccessful deleted.

0
Eduardo Serra
Telerik team
answered on 25 Oct 2016, 03:07 PM
Hello Juan,

In order to offer a complete picture of what can be done to deal with server-side errors, I encourage you to take a look at a blog post that was written by a colleague; read Handling Server-side Validation Errors in your Kendo UI Grid here.

I hope this helps!

Regards,
Eduardo Serra
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
Tags
Grid
Asked by
Juan
Top achievements
Rank 1
Answers by
Eduardo Serra
Telerik team
Juan
Top achievements
Rank 1
Share this question
or