Data.Bind.ObjectScope.TCreateItemInstanceEvent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TCreateItemInstanceEvent = procedure(Sender: TBindSourceAdapter; var AHandled: Boolean; var AInstance: TObject) of object;

C++

typedef void __fastcall (__closure *TCreateItemInstanceEvent)(TBindSourceAdapter* Sender, bool &AHandled, System::TObject* &AInstance);

Properties

Type Visibility Source Unit Parent
type
typedef
public
Data.Bind.ObjectScope.pas
Data.Bind.ObjectScope.hpp
Data.Bind.ObjectScope Data.Bind.ObjectScope

Description

TCreateItemInstanceEvent is an event handler that takes place when an adapter is requested to create a new data source item.

TCreateItemInstanceEvent has the following parameters:

  • Sender specifies the adapter.
  • AHandled set by the developer to True when the adapter does not use the default items factory to create the item instance. See TBindSourceAdapterInstanceFactory.
  • AInstance should be set to an item instance of a class type which is a subclass of the T class type of TListBindSourceAdapter<T>. When AInstance is set to nil, then no new item is inserted into the data source.

See also