jQWidgets Forums

jQuery UI Widgets Forums ASP .NET MVC Server side control committing of edits cells inside taghelepr grid

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 8 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Admir Hodžić
    Participant

    I am trying to implement editable jqx grid using MVC Tag helpers.

    When I read exaples for MVC i see Edit method implemented

      [HttpPost]
            public bool Edit(string jsonData)
            {
                SalesEmployee employee = (SalesEmployee)JsonConvert.DeserializeObject(jsonData, typeof(SalesEmployee));
                for (int i = 0; i < _context.SalesEmployees.Count; i++)
                {
                    SalesEmployee currentEmployee = _context.SalesEmployees[i];
                    if (currentEmployee.ID == employee.ID)
                    {
                        currentEmployee.FirstName = employee.FirstName;
                        currentEmployee.LastName = employee.LastName;
                        currentEmployee.ProductName = employee.ProductName;
                        currentEmployee.Price = employee.Price;
                        currentEmployee.Quantity = employee.Quantity;
                        currentEmployee.Date = employee.Date;
                        currentEmployee.Available = employee.Available;
                           
                        return true;
                    }
                }
                return false;
            }

    Is there a way to grid return message when edit method returns false.
    As I see grid locally commit edits even if controller return false.
    Sometimes it is not possible to do server-side updates, in that case I want to controller return something to GRID so end user can be shure that commit is maded on server side.

    Is there a way to subscribe on ajax success and ajax error call for MVC grid.
    Or is there a way to return user message or leave cell uncommitted inside grid when update method return false ?


    Peter Stoev
    Keymaster

    Hi adopilot,

    We are unfortunately not aware of such a way.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.