Hi,
I'm kinda new to Kendo UI so its possible I've missed it in the discussions here.
We're building a PoC with Kendo UI and MVC3 in Visual Studio 2010. What I noticed today is that an 'inline' edit in the Kendo Grid leads to different results in IE9 and FireFox. When I edit a line in IE9, update it to the server the data is persisted correctly in the DB and the screen show the new value. After a refresh however the old data is back. Closing IE9 all together and restarting the App gives me the data from DB correctly.
If I do the same in FireFox after a refresh the data is shown correctly.
When I empty the cache in IE9 before the refresh the behavior is as expected (showing the correct information from the DB).
Here's some of my code:
The Update Method in the Controller
The view:
Regards
Paul.
I'm kinda new to Kendo UI so its possible I've missed it in the discussions here.
We're building a PoC with Kendo UI and MVC3 in Visual Studio 2010. What I noticed today is that an 'inline' edit in the Kendo Grid leads to different results in IE9 and FireFox. When I edit a line in IE9, update it to the server the data is persisted correctly in the DB and the screen show the new value. After a refresh however the old data is back. Closing IE9 all together and restarting the App gives me the data from DB correctly.
If I do the same in FireFox after a refresh the data is shown correctly.
When I empty the cache in IE9 before the refresh the behavior is as expected (showing the correct information from the DB).
Here's some of my code:
The Update Method in the Controller
public HttpResponseMessage Update(int id){ HttpResponseMessage response = new HttpResponseMessage(); using(var entity = VMProjectRegel.GetById(this, Id)) { entity.Aantal = Convert.ToInt32(Request["Aantal"]); entity.Prijs = Convert.ToDecimal(Request["Prijs"]); entity.BTW = Convert.ToDecimal(Request["BTW"]); entity.CreatedOn = Convert.ToDateTime(Request["CreatedOn"]); entity.CreatedBy = Convert.ToInt32(Request["CreatedBy"]); entity.ChangedOn = Convert.ToDateTime(Request["ChangedOn"]); entity.ChangedBy = Convert.ToInt32(Request["ChangedBy"]); ORMSession.SaveChanges(); response.StatusCode = HttpStatusCode.OK; } return response;}The view:
<script src="@Url.Content("~/DataSources/ProjectOnderhoudDataSource.generated.js")" type="text/javascript"></script><div id="projectEditForm"> <input id="DatumAanvang" data-bind="value: selectedProject.DatumAanvang" /> <hr /> <div id="projectRegelGrid" /> <script type="text/javascript"> $(function () { $("#DatumAanvang").width(220).kendoDatePicker(); ProjectOnderhoudDataSource.bind("change", function (data) { ProjectOnderhoudViewModel.set("selectedProject", this.view()[0]); }); ProjectOnderhoudDataSource.read(); kendo.bind($("#projectEditForm"), ProjectOnderhoudViewModel); ProjectOnderhoudProjectRegelListDataSource.options.transport.read.parentId = 1; $("#projectRegelGrid").kendoGrid ({ columns: [ { field: "Aantal", title: "Aantal" }, { field: "Prijs", title: "Prijs" }, { field: "BTW", title: "BTW" }, { field: "CreatedOn", title: "Datum aangemaakt", template: '#= kendo.toString(CreatedOn, "dd MMMM yyyy") #' }, { field: "ChangedOn", title: "Datum gewijzigd", format: "{0:dd MM yyyy}" }, { command: ["edit", "destroy"], title: " ", width: "210px" } ], editable: "inline", deletabled: true, pageable: true, sortable: true, dataSource: ProjectOnderhoudProjectRegelListDataSource, pageSize: 3, serverPaging: false }); }); </script></div>Regards
Paul.