property G2Host.HostDef(Property as DefHostPropertyEnum) as Variant
Defines the default value for specified property.

TypeDescription
Property as DefHostPropertyEnum A DefHostPropertyEnum property that specify the property to be accessed.
Variant A Variant expression that defines the default value for giving property.
The HostDef property defines the default value for specified property. For instance, the HostDef(exNew) property defines the "(New)" caption to be displayed on the AddNew row.

The Refresh method refreshes the control including the inner host. The Refresh method may be required for changing some properties of the HostDef property.

The following VB sample changes the colors to highlight the errors:

With G2Host1
	.DataSource("Items") = "C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb"
	.DataMember("Items") = "Employees"
	.DataField(exItemsDataSource) = "Items"
	.DataField(exItemsID) = "EmployeeID"
	.HostDef(exErrorBackColor) = 0
	.HostDef(exErrorForeColor) = 16777215
End With

The following picture shows how errors shows up: