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

Grid doesn't recognize update - stays in edit mode

1 Answer 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 09 Apr 2013, 10:34 PM
I have a Kendo.Grid that remains in edit mode after updating.  The only difference between my code and the demo code (that I can tell) is I'm using a third party ORM.  The demo works fine.  

When/how does the grid know the data is persisted correctly?

Grid in View:

@(Html.Kendo()
    .Grid<Copper.Domain.Entities.EntInventory>()
    .Name("_gridCellInventory")
    .Columns(columns =>
    {
        columns.Bound(c => c.DeviceName);
        columns.Command(cmd => cmd.Edit());
    })
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
    .Scrollable()
    .DataSource(datasource => datasource
        .Ajax()
        .PageSize(20)
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(c => c.InventorySeq))
        .Read(read => read.Action("GetCellInventory", "CellInventory").Data("_gridCellInventoryParameters"))    
        .Update(update => update.Action("UpdateCellInventory", "CellInventory")) 
    )   
)

UpdateCellInventory in Controller:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult UpdateCellInventory([DataSourceRequest] DataSourceRequest request, EntInventory inventory)
{
    if (inventory != null && ModelState.IsValid)
    {
        _margoRepository.UpdateInventory(inventory);
 
    }
 
    return Json(ModelState.ToDataSourceResult());
}

Thanks,

Jerry



1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 10 Apr 2013, 07:02 AM
Hi Jerry,


Sorry for the inconvenience. The reason for this problem is a breaking change in jQuery 1.9 . Please take a look at the following forum thread, which demonstrates how to resolve the issue.

 

Regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jerry
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or