BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
I use a remoteSaveAdaptor to do the updates:
and when Inserting the Row I use a Controller Method to update the database. The controller method is very simple:
The variable data in the controller method "DialogInsert" contains all rows from the database including the newly created row. How can I refresh the DataSource of the grid, so that the new Row will be completely shown in the grid - including the Autoincrement value?
Hi Holger,
Thanks for using Syncfusion products.
Query : How can I refresh the DataSource of the grid, so that the new Row will be completely shown in the grid - including the Autoincrement value?
We are sorry to let you know that we are unable to reproduce your reported issue. We suspect that you have not set the IDENTITY to the corresponding data field in your database which is the cause of the issue. We have to compute the set of modified inserted objects in the database by using SubmitChanges function for the auto increment value. Please refer the below code snippet for further details.
[Northwind.designer.cs] [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] public int OrderID { --------- --------- } [controller] public ActionResult DialogInsert(OrdersView value) { var ds = new NorthwindDataContext(); ds.OrdersViews.InsertOnSubmit(value); ds.SubmitChanges(); var jsonData = OrderRepository.GetEditable(value); return Json(jsonData, JsonRequestBehavior.AllowGet); } |
For your convenience we have created a simple sample and the same can be downloaded from the below link.
Sample Link: http://www.syncfusion.com/downloads/support/forum/118664/IdentityRemoteUrlGrid-161444319.zip
Please let us know if you have any concerns.
Regards,
Ajith R