Version

DefaultFieldLayout Property

Gets/sets the default FieldLayout which is used by the XamTreeGrid when creating Field headers and by the old style GroupByArea UI (not the newer and preferred GroupByAreaMulti) to determine which FieldLayout to use when populating the list of Fields available for grouping in the GroupByArea.
Syntax
'Declaration
 
Public Property DefaultFieldLayout As FieldLayout
public FieldLayout DefaultFieldLayout {get; set;}
Remarks

Note: Regarding the use of this property by the grouping UI: By default the control uses the preferred GroupByAreaMulti to provide a grouping UI so this property has no impact on the FieldLayouts used/displayed in that default grouping UI. To change the grouping UI and switch between the older GroupByArea and the preferred GroupByAreaMulti use the GroupByAreaMode property. This property defaults to GroupByAreaMode.MultipleFieldLayoutsFull, but can be set to GroupByAreaMode.DefaultFieldLayoutOnly to force the control to use the older style GroupByArea grouping UI.

The FieldLayout that is considered to be the 'default' FieldLayout for use in the GroupByArea as described above can be set thru this property or via the FieldLayout's FieldLayout.IsDefault property. If not set explicitly this property will return the first one in the FieldLayouts colelction that has at least one DataRecord assigned.

Note: Regarding the use of this property by the XamTreeGrid: The XamTreeGrid uses the FieldLayout that has been designated as the 'default' to provide the Fields that determine which Field headers to display.

DataRecords are created lazily as each item in the DataSource is requested. When a DataRecord is created the FieldLayouts collection is searched for an existing FieldLayout whose FieldLayout.Fields match the DataRecord.DataItem's properties. If one is not found then a new FieldLayout is created, in which case the FieldLayoutInitializing and FieldLayoutInitialized events will be raised.

Note: If the new FieldLayout's FieldLayout.AutoGenerateFieldsResolved property returns true then the FieldLayout.Fields collection is automatically populated with a Field for every public property on the data item. This is done between the FieldLayoutInitializing and FieldLayoutInitialized events.

In any case the AssigningFieldLayoutToItem event is raised to allow a different FieldLayout to be assigned to the DataRecord. Finally the InitializeRecord event is raised.

Refer to the Fields topic in the Developer's Guide for an explanation of fields.

Refer to the Field Layout topic in the Developer's Guide for an explanation of the FieldLayout object.

Refer to the Theory of Operation topic in the Developer's Guide for an explanation of how everything works together.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also