Save the data from the gridGroupingControl to the database using the Entity framework
3 Replies
SIGN IN To post a reply.
| //Event triggering gridGroupingControl1.TableControlCurrentCellEditingComplete += GridGroupingControl1_TableControlCurrentCellEditingComplete; //Event customization private void GridGroupingControl1_TableControlCurrentCellEditingComplete(objectsender, GridTableControlEventArgs e) { EndEdit(e.TableControl.Table as GridTable); } public void EndEdit(GridTable table) { CurrentRecordPropertyCollection collection = table.CurrentRecordManager.Properties; ArrayList modifiedProperties = new ArrayList(); foreach (CurrentRecordProperty prop in collection) { if (prop.IsModified) { //To add the property descriptor to modified property descriptor modifiedProperties.Add(prop); } } foreach (CurrentRecordProperty prop in modifiedProperties) { //Update the changes to the underlying data source prop.SaveChanges(); } } |