Gets a IDataAccessor to call methods or properties of the DataObject.

Namespace: Dapfor.Net.Ui
Assembly: Dapfor.Net (in Dapfor.Net.dll) Version: (


public IDataAccessor DataAccessor { get; }
Visual Basic
Public ReadOnly Property DataAccessor As IDataAccessor
Visual C++
property IDataAccessor^ DataAccessor {
	IDataAccessor^ get ();
member DataAccessor : IDataAccessor with get

Property Value

Type: IDataAccessor
The IDataAccessor.


.Net Grid supports many data types because of the IDataAccessor interface that is one of the most crucial part of the grid. The main purpose of this interface is to normalize presentation of different data types in the grid. There are lots of implementations of IDataAccessor interface. This way, a programmer can add his own implementation to broaden the list of data types that can be used by the .Net Grid. When you call Grid.Rows.Add('your object'), an implementation of the IDataAccessor interface is created implicitly for 'your object' and the .Net Grid works with it only via the IDataAccessor proxy, making no difference between the data types.

For different objects the process of getting or setting values of a data object may vary. For user-defined classes you can use the reflection mechanism to get or set values. For IList<T> the grid gets them with a certain index; for IDictionary<string, object> with a string key so on. IDataAccessor may support or not support data field identifiers it merely depends on its nature. If an object of user defined class is inserted into the grid, than its property name become the identifiers in the IDataAccessor by default. However, sometimes identifiers may be absent, e.g. if you you use an IList<T> object as a parameter of the method Grid.Rows.Add('your object'). In such case, to display data in cells the .Net Grid uses indices of IList<T> and index of the column which is calculated when it is inserted into the header.

Thread Safety

The function is thread safe.

See Also