DVXP TEdit.NET 3.0

TableEditor.SaveData Event

When a custom DataSet is provided using the ProvideDataView event, you can handle this event to write any changes made by the user back to your datastore. TEdit.NET automatically calls AcceptChanges after the SaveData is fired.

[Visual Basic]
Public Event SaveData As SaveDataEventHandler
[C#]
public event SaveDataEventHandler SaveData;

Event Data

The event handler receives an argument of type SaveDataEventArgs containing data related to this event. The following SaveDataEventArgs properties provide information specific to this event.

PropertyDescription
DataTable The data table that contains the data to save
IsHandled Set this property to true if you have handled this event. This will prevent the table editor from trying to save the changes itself to the database.

Example

            OleDbCommand cmd; // Populate this with a SQL Select command 
            OleDbDataAdapter da = new OleDbDataAdapter(cmd);
            OleDbCommandBuilder cb = new OleDbCommandBuilder(da);
            da.Update(e.DataTable);
            e.IsHandled = true;
            

See Also

TableEditor Class | DVXP.DXTableEditor Namespace | SaveDataEventArgs