RowRemoved Event
Occurs when an observable table removes a row. Subscribe here if you must keep external caches (for example, a lookup dictionary) in sync with table contents.
/// <summary>
/// RowsRemoved event
/// IObservableDataTable interface implementation
/// </summary>
public event EventHandler<RowsChangedEventArgs>? RowRemoved;
Namespace: PocoDataSet.ObservableData
Assembly: PocoDataSet.ObservableData.dll
// 1. Create observable data set
IObservableDataSet observableDataSet = new ObservableDataSet();
// 2. Subsribe to ObservableDataSet.RowRemoved event
observableDataSet.RowRemoved += ObservableDataSet_RowRemoved;
// 3. Add observable table to observable data set
IObservableDataTable department = observableDataSet.AddNewTable("Department");
department.AddColumn("Id", DataTypeNames.INT32, isPrimaryKey: true);
department.AddColumn("Name", DataTypeNames.STRING);
// 4. Add a new observable data row to observable data table
IObservableDataRow row = department.AddNewRow();
// 5. Remove row from observable data table and observe that RowRemoved event was raised and handled
department.RemoveRow(row);
static void ObservableDataSet_RowRemoved(object? sender, RowsChangedEventArgs e)
{
Console.WriteLine($"Row removed from {e.TableName} at index {e.RowIndex}.");
}
Table of Content POCO DataSet API References ObservablePOCO DataSet Types ObservableDataSet Members
Business Process Programming in .Net
© 2004–2026 Laskarzhevsky Software Inc.
Unless otherwise noted, the content of this website is licensed under the
Creative Commons Attribution 4.0 International License (CC BY 4.0).
Code examples are provided under the MIT License.
You are free to share and adapt the material provided that appropriate
credit is given and any modifications are clearly indicated.
The information provided on this website is for educational purposes only.
The author and publisher make no warranties regarding the completeness
or suitability of the information and are not responsible for any damages
resulting from its use.