We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to show message after saving grid information in controller

Thread ID:

Created:

Updated:

Platform:

Replies:

123214 Feb 26,2016 08:34 AM UTC Feb 29,2016 06:29 AM UTC ASP.NET MVC 1
loading
Tags: Grid
Mahindra Morar
Asked On February 26, 2016 08:34 AM UTC

Hi,

I am mapping the CRUD operations in Grid to a Server-Side Controller action using the properties InsertURL, RemoveURL, UpdateURL, 
What is the best way to display a dynamic message after saving data on the server? Also I am using the Dialog Template Form for editing editing.

I am using the following method in the controller to bind the Grid and as another option can I add another property to the DataResult class and somehow display that property value in the View or better still a Dialog control.

public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm)
  {
               var DataSource = OrderRepository.GetAllRecords();
                DataResult result = new DataResult();
                result.result = DataSource.Skip(dm.Skip).Take(dm.Take).ToList();
                result.count = DataSource.Count();
                return Json(result, JsonRequestBehavior.AllowGet);
 }

public class DataResult
{
     public IEnumerable<EditableOrder> result { get; set; }
     public int count { get; set; }

}
Thanks for any assistance.

Ragavee U S [Syncfusion]
Replied On February 29, 2016 06:29 AM UTC

Hi Mahindra,

Thanks for your interest in Syncfusion products.

We analyzed your requirement to display custom messages after saving data on the server. We can achieve this using the ActionComplete event of the Grid when the requestType is “save”. Please refer to the below code example.

//actionComplete event of the Grid1

    function complete(args) {

        if(args.requestType == "save"){

            alert("Data Saved successfully");

        }
    }


API reference documentation link: http://help.syncfusion.com/js/api/ejgrid#events:actioncomplete

Regards,
Ragavee U S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;