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. Image for the cookie policy date
close icon

How to show message after saving grid information in controller

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.

1 Reply

RU Ragavee U S Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon