2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Reject the changesBy default, any change made to the GridGrouping control affects the underlying DataSource. The RejectChanges() method rejects the recent changes made to the DataSource without being saved. Ensure that the AcceptChanges() method is called after the DataSource is filled as the RejectChanges method rolls back all the changes made to the DataSource since the last call of the AcceptChanges method. C# private void btn_reject_Click(object sender, EventArgs e) { DataTable dt = this.gridGroupingControl1.DataSource as DataTable; //Rolls back all the changes made to the table since it was loaded or after the AcceptChanges() was called. dt.RejectChanges(); } private void btn_accept_Click(object sender, EventArgs e) { DataTable dt = this.gridGroupingControl1.DataSource as DataTable; //Commits all the changes made to the table. dt.AcceptChanges(); } VB Private Sub btn_reject_Click(ByVal sender As Object, ByVal e As EventArgs) Dim dt As DataTable = TryCast(Me.gridGroupingControl1.DataSource, DataTable) 'Rolls back all the changes made to the table since it was loaded or after the AcceptChanges() was called. dt.RejectChanges() End Sub Private Sub btn_accept_Click(ByVal sender As Object, ByVal e As EventArgs) Dim dt As DataTable = TryCast(Me.gridGroupingControl1.DataSource, DataTable) 'Commits all the changes made to the table. dt.AcceptChanges() End Sub Samples: |
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.