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

[Solved] confirmation messages after save and delete

6 Answers 287 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bassam
Top achievements
Rank 1
Bassam asked on 09 Feb 2011, 07:34 PM
What's best practice to set confirmation messages after save and delete, I am using Ajax binding.
the confirmation are either successful message after successfully insertion ,editing or deleting a row
and failure message if operation failed.

6 Answers, 1 is accepted

Sort by
0
Neena
Top achievements
Rank 1
answered on 10 Feb 2011, 08:40 PM
Hi,

I am even looking for an answer for this question to show the user with the Confirmation message for Insert, Update and Delete for Editable Grid - Ajax Binding using PopUp edit mode.

Please some one help.

Thanks,
Usha
0
Nebras
Top achievements
Rank 1
answered on 20 Jun 2011, 12:58 PM
I have the same issue , please we need help ..
0
Atanas Korchev
Telerik team
answered on 20 Jun 2011, 04:22 PM
Hello,

During editing the grid will fire the following client-side events:

  1. OnEdit when the enters edit mode
  2. OnSave when the user commits the changes
  3. OnError if there is any server side exception or model state errors
  4. OnDataBound if there is no error because the grid is rebound

I guess you can use the OnSave and OnDataBound events and display confirmation from the latter.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
SEAN
Top achievements
Rank 1
answered on 08 Oct 2011, 07:28 PM
I'm having the same issue as the other people that posted in this thread - the problem is that the OnDelete event fires before the user confirms that they want to delete the row. If they cancel the delete I don't want my code to run, so we really need an event to fire after a row is deleted. OnSave fires after an edit and after an insert with a mode to indicate which it is, perhaps OnSave could also fire after a delete with mode set to "delete".
0
FinallyInSeattle
Top achievements
Rank 1
answered on 05 Jan 2012, 08:05 PM
I've added a Feature Request for an event that fires AFTER a row is deleted - http://www.telerik.com/support/pits.aspx#/details/Issue=8725.  Voting for this item will increase the likelihood that it will be impelemented.
0
Sreyas
Top achievements
Rank 1
answered on 15 Jun 2012, 04:20 AM
Hi,

Write this common code in your layout page and implement the method SaveData in your controller..
So this is an Ajax post,so return the controller as json and then it will produce this confirmation message.


$("#commonSave").click(function () {
                var urlPath = '/' + areaName + '/' + controllerName + '/SaveData';
                var postData = $('form[id*="Content"]').serialize();
                $.ajax({
                    url: urlPath,
                    type: "POST",
                    data: postData,
                    dataType: "JSON",
                    success: function (data) {
 
            alert("Data Saved Successfuly");

                    },
                    error: function (xhr, status, error) {
                        alert("error ...!");
                       
                    }
                });
            });



Tags
Grid
Asked by
Bassam
Top achievements
Rank 1
Answers by
Neena
Top achievements
Rank 1
Nebras
Top achievements
Rank 1
Atanas Korchev
Telerik team
SEAN
Top achievements
Rank 1
FinallyInSeattle
Top achievements
Rank 1
Sreyas
Top achievements
Rank 1
Share this question
or