IDataStoreBase.RowDeleted Event
.NET Standard 2.x
Occurs when the deletion of the row is completed.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
public event DwEventHandler<object, DwRowChangeEventArgs> RowDeleted;
Remarks
This event occurs after the Remove, RemoveAt or DeleteRow method is called.
Examples
The following code example demonstrates that the RowDeleted event is triggered after DeleteRow is executed in the DataStore.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IDataStoreBaseExamples
{
public class RowDeletedExample
{
private SchoolContext _context;
public RowDeletedExample(SchoolContext dataContext)
{
// Sets the data context.
_context = dataContext;
}
public void Example()
{
// Instantiates datastore with datawindow: d_department.
var department = new DataStore("d_department", _context);
// Defines what to do after DeleteRow completes.
department.RowDeleted +=
(object sender, DwRowChangeEventArgs args) =>
{
Console.WriteLine("After DeleteRow, Retrieve Count = {0}.",
department.RowCount);
};
department.Retrieve();
Console.WriteLine("Retrieve Count = {0}", department.RowCount);
// Deletes the second row.
department.RemoveAt(1);
/*This code produces the following output:
After DeleteRow, Retrieve Count = 4.
*/
}
}
}
Example Refer To
Model Class: D_Department
DataWindow File: d_department
Applies to
.NET Standard
2.x