IDataStoreBase.RetrieveStart Event
.NET Standard 2.x
Occurs when the retrieval is about to begin.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
public event DwEventHandler<object, DwRetrieveEventArgs> RetrieveStart;
Remarks
To prevent the previously retrieved data from being cleared, set DwRetrieveEventArgs.IsResetBuffer
to false
to allow the current retrieval process to append new rows to the old data.
To cancel the retrieval, set DwRetrieveEventArgs.IsCancel
to true
.
Examples
The following code example demonstrates that the RetrieveStart
event is triggered when DataStore starts retrieving data.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IDataStoreBaseExamples
{
public class RetrieveStartExample
{
private SchoolContext _context;
public RetrieveStartExample(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 when retrieval starts.
department.RetrieveStart +=
(object sender, DwRetrieveEventArgs args) =>
{
Console.WriteLine("Begin to retrieve data for DataStore.");
};
department.Retrieve();
/*This code produces the following output:
Begin to retrieve data for DataStore.
*/
}
}
}
Example Refer To
Model Class: D_Department
DataWindow File: d_department
Applies to
.NET Standard
2.x