Kendo Grid inline Edit after need displayed sucessful message

4 posts, 0 answers
  1. Parthasarathi
    Parthasarathi avatar
    24 posts
    Member since:
    Oct 2012

    Posted 12 Dec 2012 Link to this post

    Hi All,
               I am using inline edit in kendo grid with ForeignKey in my MVC3 Application. The record was updated successfully in database,but i want to displayed message like "The record was updated successfully" in my View. How to do that. Please share me if you have information about this.

    Please find my edit Kendo grid Edit event

            public ActionResult CommandParameterTypeUpdate([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<CommandParameterModel> commandParameters)
               ///Update to database   
                return Json(ModelState.ToDataSourceResult());

    I want to displayed "The record was updated successfully" message in my view from this edit event.

    Parthasarathi M
  2. Vladimir Iliev
    Vladimir Iliev avatar
    2206 posts

    Posted 14 Dec 2012 Link to this post

    Hi Parthasarathi,

    Basically you can use the RequestEnd event to check if the current event type is "Update" and the Errors property in the response is empty to display to notify the user that the "Update" is successful. Please check the example below:

    Define DataSource RequestEnd handler:

    .Events(e => e.RequestEnd("onRequestEnd"))

    onRequestEnd function:
    function onRequestEnd(e) {
        //Check request type
        if (e.type == "create" || e.type == "update") {
            //check for errors in the response
            if (e.response == null || e.response.Errors == null) {
    Kind regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kushan Shah
    Kushan Shah avatar
    18 posts
    Member since:
    Jul 2006

    Posted 07 Sep 2018 in reply to Vladimir Iliev Link to this post

    Hi Support Team,

    I am getting same issue. OnRequestEnd, I cant see the value set in TempData, ViewData or ViewBag.


  4. Viktor Tachev
    Viktor Tachev avatar
    2497 posts

    Posted 11 Sep 2018 Link to this post

    Hello Kushan,

    The suggestion for handling requestEnd can be used to determine if the operation on the server was successful or not and show relevant message to the user. 

    If you would like to use values stored in ViewData I can suggest the approach described in the following stackoverflow thread. 

    With that said, please submit each new query in a separate ticket or post. This way the information in a given thread will be consistent and easier to use as reference in the future. 

    Viktor Tachev
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top