Copyright: Copyright © 1999-2007 Developer Express Inc. ALL RIGHTS RESERVED  Unauthorized reproduction, duplication or distribution of this program is strictly prohibited.


dxMasterViewColumns Unit Overview
 dxMasterViewColumns Unit

Classes

TdxMasterViewCheckColumn

TdxMasterViewGraphicColumn

TdxMasterViewImageColumn

TdxMasterViewImageColumnItems


TdxMasterViewCheckColumn
TdxMasterViewCheckColumn Object

Hierarchy          Properties          Methods          Events

A TdxMasterViewCheckColumn object represents a check column in the ExpressMasterView.

Unit

dxMasterViewColumns

Declaration

TdxMasterViewCheckColumn = class(TdxMasterViewColumn);

Description

TdxMasterViewCheckColumn objects are useful when displaying values of Boolean fields within a MasterView control.  It allows you to embed a checkbox within cells of a specific column as displayed below.

To define a TdxMasterViewCheckColumn object, you should choose the appropriate column type when adding a new column at design time


Hierarchy

TComponent

     |

TdxMasterViewColumn

     |


 TdxMasterViewCheckColumn Properties

TdxMasterViewCheckColumn          Legend

In TdxMasterViewCheckColumn

Border3D

DisplayChecked

DisplayNull

DisplayUnchecked

ShowNullFieldStyle

ValueChecked

ValueUnchecked

Derived from TdxMasterViewColumn

Alignment

AssignedValues

Caption

ColIndex

ContentStyle

Control

Field

FieldName

FooterAlignment

FooterStyle

GroupIndex

HeaderAlignment

HeaderGlyph

HeaderGlyphAlignment

HeaderStyle

Index

Level

MaxRowCount

MaxWidth

MinRowCount

MinWidth

MultiLine

Options

RowCount

RowIndex

SortIndex

SortOrder

SummaryField

SummaryFieldName

SummaryFormat

SummaryType

Visible

VisibleIndex

VisibleWidth

Width


TdxMasterViewCheckColumn Methods

TdxMasterViewCheckColumn          Legend

In TdxMasterViewCheckColumn

Assign

Derived from TdxMasterViewColumn

ApplyBestFit

Assign

ChangeWidth

Create

Destroy

GetBestFitWidth

GetParentComponent

HasParent


TdxMasterViewCheckColumn Events

TdxMasterViewCheckColumn          Legend

Derived from TdxMasterViewColumn

OnAfterCalcSummary

OnBeforeCalcSummary

OnCalcSummary

OnGetContentStyle

OnGetFooterStyle

OnGetHeaderStyle


TdxMasterViewCheckColumn.Border3D

TdxMasterViewCheckColumn

Determines check box border style.

property Border3D : Boolean;

Description

Use the Border3D property to specify the border style of a check box in a cell.  If this property is set to True, a check box has a 3D look; Otherwise False.  The default value for this property is False.

Property’s Value	Example
True
False


TdxMasterViewCheckColumn.DisplayChecked

TdxMasterViewCheckColumn          See Also

Specifies the value of a column when the check box is checked.

property DisplayChecked : string;

Description

Each grouped node has a specific expression when grouped by a check column.  This property determines the text used when the check box is checked.


TdxMasterViewCheckColumn.DisplayNull

TdxMasterViewCheckColumn          See Also

Specifies the value of a column when the check box is neither checked nor unchecked.

property DisplayNull : string;

Description

Each grouped node has a specific expression when grouped by a check column.  The DisplayChecked property determines the text used when the check box is checked.


TdxMasterViewCheckColumn.DisplayUnchecked

TdxMasterViewCheckColumn          See Also

Specifies the value of a column when the check box is unchecked.

property DisplayUnchecked : string;

Description

Each grouped node has a specific expression when grouped by a check column.  Use this property to determine the text used when the check box is unchecked.


TdxMasterViewCheckColumn.ShowNullFieldStyle

TdxMasterViewCheckColumn

Determines the display style for the null state of a field.

type

 TdxMVShowNullFieldStyle = (nfsUnchecked, nfsInactive, nfsGrayedChecked);

property ShowNullFieldStyle : TdxMVShowNullFieldStyle;

Description

Use this property to specify the manner in which a field is displayed when the value of the appropriate field is not specified.  The default value for this property is nfsUnchecked.  The following values are available:

Value	Meaning	Example
nfsUnchecked	The check box is drawn unchecked.
nfsInactive	The check box is drawn inactive.
nfsGrayedCheck	The check box is grayed.


TdxMasterViewCheckColumn.ValueChecked

TdxMasterViewCheckColumn          See Also

Determines text for the checked status.

property ValueChecked : string;

Description

Use the ValueChecked property to specify a field value for the checked status.  The check box is checked when the appropriate field contains this value.


TdxMasterViewCheckColumn.ValueUnchecked

TdxMasterViewCheckColumn          See Also

Determines text for the unchecked status.

property ValueUnchecked : string;

Description

Use the ValueUnchecked property to specify a field value for the unchecked status.  The check box is unchecked when the appropriate field contains this value.


TdxMasterViewCheckColumn.Assign

TdxMasterViewCheckColumn

Copies the contents of one TdxMasterViewCheckColumn object to another.

procedure Assign(Source: TPersistent);  override;

Description

Call the Assign method to copy the properties of one check column to another check column.  The standard form of a call to Assign is

Destination.Assign(Source);

This forces Destination to copy the contents of Source to itself.


TdxMasterViewGraphicColumn
TdxMasterViewGraphicColumn Object

Hierarchy          Properties          Methods          Events

A TdxMasterViewGraphicColumn object represents a graphic column within the ExpressMasterView.

Unit

dxMasterViewColumns

Declaration

TdxMasterViewGraphicColumn = class(TdxMasterViewColumn);

Description

Use a TdxMasterViewGraphicColumn object to display graphic fields directly within the ExpressMasterView.  It allows you to embed a picture within cells of a specific column as displayed below.

To define a TdxMasterViewGraphicColumn object, you should select the appropriate column type when adding a new column at design time


Hierarchy

TComponent

     |

TdxMasterViewColumn

     |


TdxMasterViewGraphicColumn Properties

TdxMasterViewGraphicColumn          Legend

In TdxMasterViewGraphicColumn

BlendedSelection

CustomGraphic

Picture

Stretch

Transparent

Derived from TdxMasterViewColumn

Alignment

AssignedValues

Caption

ColIndex

ContentStyle

Control

Field

FieldName

FooterAlignment

FooterStyle

GroupIndex

HeaderAlignment

HeaderGlyph

HeaderGlyphAlignment

HeaderStyle

Index

Level

MaxRowCount

MaxWidth

MinRowCount

MinWidth

MultiLine

Options

RowCount

RowIndex

SortIndex

SortOrder

SummaryField

SummaryFieldName

SummaryFormat

SummaryType

Visible

VisibleIndex

VisibleWidth

Width


TdxMasterViewGraphicColumn Methods

TdxMasterViewGraphicColumn          Legend

In TdxMasterViewGraphicColumn

Assign

Derived from TdxMasterViewColumn

ApplyBestFit

Assign

ChangeWidth

Create

Destroy

GetBestFitWidth

GetParentComponent

HasParent


TdxMasterViewGraphicColumn Events

TdxMasterViewGraphicColumn          Legend

In TdxMasterViewGraphicColumn

OnGetGraphicClass

Derived from TdxMasterViewColumn

OnAfterCalcSummary

OnBeforeCalcSummary

OnCalcSummary

OnGetContentStyle

OnGetFooterStyle

OnGetHeaderStyle


TdxMasterViewGraphicColumn.BlendedSelection

TdxMasterViewGraphicColumn

Blends image colors for selected nodes.

property BlendendSelection: Boolean;

Description

Set the BlendedSelection property to True to blend image colors for selected nodes as displayed below.  The default value for this property is False.


TdxMasterViewGraphicColumn.CustomGraphic

TdxMasterViewGraphicColumn

Determines whether a graphic column displays custom images.

property CustomGraphic: Boolean;

Description

Set the CustomGraphic property to True, if a TdxMasterViewGraphicColumn object displays non-bitmap images, i.e. JPEG, GIF, ICON, etc.  If the CustomGraphic property is False (the default value), images are considered as a TBitmap.


TdxMasterViewGraphicColumn.Picture

TdxMasterViewGraphicColumn

Specifies the image that appears within a graphic column cell.

property Picture : TPicture;

Description

The Picture property is designed for internal use only.  It is used to set a TPicture object that contains icons, metafiles, bitmap graphics, or user-defined graphics to be displayed in a cell of the TdxMasterViewGraphicColumn object.

ReadOnly Property


TdxMasterViewGraphicColumn.Stretch

TdxMasterViewGraphicColumn

Determines whether bitmaps and metafiles assume the size and the shape of an image.

property Stretch: Boolean;

Description

Set Stretch to True to force a picture to assume the size and the shape of an image control.  When the control resizes, the picture resizes as well.  Stretch resizes an image’s height and width independently.  If the Stretch property is False (the default value), an image is displayed in a graphic column cell as is, without any magnification.  Thus, only a portion of it can be visible in a cell.

Property’s Value	Example
True
False


TdxMasterViewGraphicColumn.Transparency

TdxMasterViewGraphicColumn

Specifies transparency type.

type

 TdxMasterViewTransparency = (tpDefault, tpOpaque, tpTransparent);

property Transparency: TdxMasterViewTransparency;

Description

Use the Transparency property to specify the manner in which an image is displayed within a cell.  Set the Transparency property to tpDefault (the default value) to use settings appropriate to the graphic itself (transparent for metafiles, opaque for bitmaps).  Set the property to tpOpaque to make the background opaque.  Set the property to tpTransparent to make the background transparent.


TdxMasterViewGraphicColumn.Assign

TdxMasterViewGraphicColumn

Copies the contents of one TdxMasterViewGraphicColumn object to another.

procedure Assign(Source: TPersistent);  override;

Description

Call the Assign method to copy the properties of a graphic column to another graphic column.  The standard form of a call to Assign is

Destination.Assign(Source);

This forces Destination to copy the contents of Source to itself.


TdxMasterViewGraphicColumn.OnGetGraphicClass
OnGetGraphicClass Event

TdxMasterViewGraphicColumn

Occurs when a graphic column is drawn.

type

 TGraphicClass = class of TGraphic;

 TdxMasterViewGetGraphicClassEvent = procedure(Sender: TObject; Node: TdxMasterViewNode; var GraphicClass: TGraphicClass) of object;

property OnGetGraphicClass: TdxMasterViewGetGraphicClassEvent;

Description

Write an OnGetGraphicClass event handler when you wish to display images of different types in the same graphic column.  The Node parameter determines the node to which a drawn cell belongs.  Use this parameter to specify different image types for different nodes, i.e. JPEG for grouped nodes and ICON for regular nodes.  The GraphicClass parameter specifies image type.


TdxMasterViewImageColumn
TdxMasterViewImageColumn Object

Hierarchy          Properties          Methods          Events

A TdxMasterViewImageColumn object represents an image column in the ExpressMasterView.

Unit

dxMasterViewColumns

Declaration

TdxMasterViewImageColumn = class(TdxMasterViewColumn);

Description

Use a TdxMasterViewImageColumn object to display images with descriptions.  This column can be used to represent fields, which can assume a limited set of values, i.e. Payment method.

To define a TdxMasterViewImageColumn object, you should choose the appropriate column type when adding a new column at design time


Hierarchy

TComponent

     |

TdxMasterViewColumn

     |


TdxMasterViewImageColumn Properties

TdxMasterViewImageColumn          Legend

In TdxMasterViewImageColumn

Images

Items

ShowDescription

Derived from TdxMasterViewColumn

Alignment

AssignedValues

Caption

ColIndex

ContentStyle

Control

Field

FieldName

FooterAlignment

FooterStyle

GroupIndex

HeaderAlignment

HeaderGlyph

HeaderGlyphAlignment

HeaderStyle

Index

Level

MaxRowCount

MaxWidth

MinRowCount

MinWidth

MultiLine

Options

RowCount

RowIndex

SortIndex

SortOrder

SummaryField

SummaryFieldName

SummaryFormat

SummaryType

Visible

VisibleIndex

VisibleWidth

Width


TdxMasterViewImageColumn Methods

TdxMasterViewImageColumn          Legend

In TdxMasterViewImageColumn

Assign

Derived from TdxMasterViewColumn

ApplyBestFit

Assign

ChangeWidth

Create

Destroy

GetBestFitWidth

GetParentComponent

HasParent


TdxMasterViewImageColumn Events

TdxMasterViewImageColumn          Legend

Derived from TdxMasterViewColumn

OnAfterCalcSummary

OnBeforeCalcSummary

OnCalcSummary

OnGetContentStyle

OnGetFooterStyle

OnGetHeaderStyle


TdxMasterViewImageColumn.Images

TdxMasterViewImageColumn          See Also

Determines an Image list collection associated with a TdxMasterViewImageColumn object.

property Images : TImageList;

Description

A TdxMasterViewImageColumn object uses pictures from the Image list to display images.  An image from the Image list is linked with an item via the ImageIndexes property of the TdxMasterViewImageColumnItems object.


TdxMasterViewImageColumn.Items

TdxMasterViewImageColumn          See Also

Specifies a TdxMasterViewImageColumnItems object.

property Items : TdxMasterViewImageColumnItems;

Description

Use the Items property to access the list of image column items.  This list maintains relationships between image indexes and corresponding field values.  To access this list at design time press the Items button in the Object Inspector and the following window will appear on screen:


TdxMasterViewImageColumn.ShowDescription

TdxMasterViewImageColumn          See Also

Specifies whether to display an item’s description in image column cells.

property ShowDescription : Boolean;

Description

If the ShowDescription property is True (the default value), item descriptions are displayed within cells.

Property’s Value	Example
True
False


TdxMasterViewImageColumn.Assign

TdxMasterViewImageColumn

Copies the contents of one TdxMasterViewImageColumn object to another.

procedure Assign(Source: TPersistent);  override;

Description

Call the Assign method to copy the properties of one image column to another image column.  The standard form of a call to Assign is

Destination.Assign(Source);

This forces Destination to copy the contents of Source to itself.


TdxMasterViewImageColumnItems
TdxMasterViewImageColumnItems Object

Hierarchy          Properties          Methods          Events

Stores a list of items (values, descriptions and image indexes).

Unit

dxMasterViewColumns

Declaration

TdxMasterViewImageColumnItems = class(TPersistent);

Description

TdxMasterViewImageColumnItems objects are used to maintain relationships between image indexes and corresponding field values for a tdxMasterViewImageColumn.  This class introduces properties and methods to:

•	Add or delete items in the list.

•	Locate and access items in the list.

To access this list at design time, press the Items button in the Object Inspector and the following window will appear on screen:


Hierarchy

TPersistent

     |


TdxMasterViewImageColumnItems Properties

TdxMasterViewImageColumnItems          Legend

In TdxMasterViewImageColumnItems

Count

Descriptions

ImageIndexes

Values


TdxMasterViewImageColumnItems Methods

TdxMasterViewImageColumnItems          Legend

In TdxMasterViewImageColumnItems

Add

BeginUpdate

Change

Clear

Delete

EndUpdate

IndexOfValue

Insert


TdxMasterViewImageColumnItems Events

TdxMasterViewImageColumnItems          Legend

In TdxMasterViewImageColumnItems

OnChange


TdxMasterViewImageColumnItems.Count

TdxMasterViewImageColumnItems          See Also

Indicates the number of image items in a list.

property Count : Integer;

Description

Use the Count property to determine the number of image items in the array of the Items property of a TdxMasterViewImageColumn object.


TdxMasterViewImageColumnItems.Descriptions

TdxMasterViewImageColumnItems          See Also

Represents the description portion of an Image Items array.

property Descriptions[Index:Integer] : string;

Description

The Item description is the text that appears to the left of an image.  The Index parameter determines the index of the description.  The index of the first description is 0.  The total number of descriptions is returned by the Count property.  The first element of the Descriptions array is the description of the first item; the second element corresponds to the description of the second item; etc.


TdxMasterViewImageColumnItems.ImageIndexes

TdxMasterViewImageColumnItems          See Also

Represents the image indexes portion of an Image Items array.

property ImageIndexes[Index:Integer] : Integer;

Description

Image index determines the picture from the Images property that is displayed as a graphic.  The Index parameter determines the index of the picture in the Image list.  The index of the first image is 0.  The total number of images is returned by the Count property.  The first element of the ImageIndexes array is the image of the first item; the second element corresponds to the image of the second item; etc.


TdxMasterViewImageColumnItems.Values

TdxMasterViewImageColumnItems          See Also

Represents the values portion of an Image Items array.

property Values[Index:Integer] : string;

Description

The Values property represents an array of possible field values with associated image indexes and descriptions.  The Index parameter determines the index of a field value in the Image Items list.  The index of the first field value is 0.  The total number of possible field values is returned by the Count property.  The first element of the Values array is the field value of the first item; the second element corresponds to the field value of the second item; etc.


TdxMasterViewImageColumnItems.Add

TdxMasterViewImageColumnItems          See Also

Adds a new item to the end of the list.

procedure Add(const AValue: string; AImageIndex: Integer; const ADescription: string);

Description

Call the Add method to insert a new item to the end of the Image Items list.  The AValue parameter determines a field value that corresponds to the newly added item.  The AImageIndex and ADescription parameters determine which image and description are displayed when the appropriate field contains the value determined by the AValue parameter.  The Add method increments the Count property.


TdxMasterViewImageColumnItems.BeginUpdate

TdxMasterViewImageColumnItems          See Also

Disables ImageColumn Items Editor refresh operations.

procedure BeginUpdate;

Description

Calling the BeginUpdate method disables OnChange event generation.  If the BeginUpdate procedure has been called, any changes to values, image indexes and descriptions are not refreshed until calling the EndUdpate method.  The BeginUpdate and EndUpdate methods work together to prevent numerous updates of the Items Editor window.  Make certain that you call the EndUpdate method after each call of the BeginUpdate method.  Every call of the BeginUpdate method increases the internal counter by one.  Every call of the EndUpdate decreases this counter by one.  The Image Editor window can refresh itself only when the internal counter is 0.


TdxMasterViewImageColumnItems.Change

TdxMasterViewImageColumnItems          See Also

Changes the values of existing elements in the Image Items list.

procedure Change(Index: Integer; const AValue: string;      AImageIndex: Integer; const ADescription: string);

Description

Use the Change method to modify an element of the Image Items list specified by the Index parameter (the index is zero-based).  The AValue parameter determines a new field value.  The AImageIndex parameter determines a new image index.  The ADescription parameter determines a new item description.  This method generates an OnChange event.


TdxMasterViewImageColumnItems.Clear

TdxMasterViewImageColumnItems          See Also

Deletes all items from the Image Items list.

procedure Clear;

Description

Call the Clear method to empty the Image Items array and set the Count to 0.


TdxMasterViewImageColumnItems.Delete

TdxMasterViewImageColumnItems          See Also

Removes an item from the Image Items list.

procedure Delete(Index: Integer);

Description

Call the Delete method to remove an item, at a position specified by the Index parameter, from the list.  The index is zero-based, so the first node has an Index value of 0, the second node has an Index value of 1, etc.


TdxMasterViewImageColumnItems.EndUpdate

TdxMasterViewImageColumnItems          See Also

Enables ImageColumn Items Editor refresh operations.

procedure EndUpdate;

Description

Calling the EndUpdate method enables OnChange event generation.  The BeginUpdate and EndUpdate methods work together to prevent numerous updates of the Items Editor.  Make certain that you call the EndUpdate method after each call of the BeginUpdate method.  Every call of the BeginUpdate method increases the internal counter by one.  Every call of the EndUpdate method decreases the internal counter by one.  The Items Editor can refresh itself only when the internal counter is 0.


TdxMasterViewImageColumnItems.IndexOfValue

TdxMasterViewImageColumnItems          See Also

Returns the index of a specified value.

function IndexOfValue(const Value: string): Integer;

Description

Call the IndexOfValue method to get the index of the value specified by the Value parameter to access the corresponding image index and description.  The first value in the list has an index of 0, the second value has an index of 1, etc.  If the value cannot be located in the list, then the IndexOfValue method returns -1.


TdxMasterViewImageColumnItems.Insert

TdxMasterViewImageColumnItems          See Also

Adds an item to the list.

procedure Insert(Index: Integer; const AValue: string; AImageIndex: Integer; const ADescription: string);

Description

Call the Insert method to insert a new item to the position of the Image Items list specified by the Index parameter. The index is zero-based, so the first node has an index of 0.  The AValue parameter determines a field value that corresponds to the inserted item.  The AImageIndex and ADescription parameters determine which image and description are displayed when the appropriate field contains the value specified by the AValue parameter.  The Insert method increments the Count property.


TdxMasterViewImageColumnItems.OnChange
OnChange Event

TdxMasterViewImageColumnItems          See Also

Occurs when the contents of an Items Editor window changes.

type

TNotifyEvent = procedure(Sender: TObject) of object;

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to perform specific actions when modifying the Image Items list.


dxMasterView Unit Overview
dxMasterView Unit

Classes

TdxMasterView

TdxMasterViewColumn

TdxMasterViewLayout

TdxMasterViewLevel

TdxMasterViewList

TdxMasterViewNode

TdxMasterViewStyle

Global Variables

dxMVGroupByBoxText


TdxMasterView
TdxMasterView Object

Hierarchy          Properties          Methods          Events

The TdxMasterView object is the core object of the ExpressMasterView.

Unit

dxMasterView

Declaration

TdxMasterView = class(TCustomControl);

Description

The TdxMasterView object allows you to represent multiple datasets in a hierarchical manner within a single grid control.  With the ExpressMasterView, you can finally give your end-users a way to view master/detail and self-referenced data in an intuitive manner.


Hierarchy

TCustomControl

     |


TdxMasterView Properties

TdxMasterView          Legend

In TdxMasterView

AbsoluteItemCount

AbsoluteItems

AbsoluteItemsList

AbsoluteLevelCount

AbsoluteLevels

ArrowsColor

CustomizationForm

CustomizationFormLevel

CustomizationFormPos

CustomizationFormRowCount

Customizing

FocusedIndex

FocusedNode

HighlightStyle

InactiveStyle

IniFileName

Items

LeftPos

Levels

MovingColumn

MovingColumnNode

OptionsBehavior

OptionsDB

OptionsView

PartVisibleItemCount

RegistryPath

SelectedItemCount

SelectedItems

SelectedItemsList

SizingColumn

State

StyleCount

Styles

TopIndex

TopNode

VisibleItemCount


TdxMasterView Methods

TdxMasterView          Legend

In TdxMasterView

ApplyBestFit

BeginLayout

BeginSelection

BeginUpdate

CancelLayout

CancelUpdate

ClearSelection

Create

CreateStyle

DeleteSelection

Destroy

EndLayout

EndSelection

EndUpdate

FocusNode

FullCollapse

FullExpand

GetHitTestInfo

Invalidate

LoadFromRegIniFile

NodeFromID

NodeFromKeyValue

SaveToRegIniFile

SelectItems

ShowFocusedNode

UpdateData


TdxMasterView Events

TdxMasterView          Legend

In TdxMasterView

OnAfterColumnMoving

OnBeforeColumnMoving

OnColumnMoving

OnCustomizing

OnFocusNode

OnLeftPosChanged

OnSelectionChanged

OnSelectNode

OnTopNodeChanged


TdxMasterView.AbsoluteItemCount

TdxMasterView          See Also

Determines the number of TdxMasterViewNode objects in a TdxMasterView object.

property AbsoluteItemCount: Integer;

Description

Use the AbsoluteItemCount property to return the number of expanded nodes in a TdxMasterView object.

ReadOnly Property


TdxMasterView.AbsoluteItems

TdxMasterView          See Also

Determines a node via its absolute index.

property AbsoluteItems[Index: Integer] : TdxMasterViewNode;

Description

Use the AbsoluteItems property to access a specific node.  The Index parameter determines its absolute index among all other expanded nodes.  The first MasterView node has an index of 0 and subsequent nodes are numbered sequentially.   The index of the last node is one less than the value of the AbsoluteItemCount property.

ReadOnly Property


TdxMasterView.AbsoluteItemsList

TdxMasterView          See Also

Returns the list of all nodes.

property AbsoluteItemsList : TdxMasterViewList;

Description

Use this property to obtain the TdxMasterViewList which contains the list of all MasterView nodes.

ReadOnly Property


TdxMasterView.AbsoluteLevelCount

TdxMasterView          See Also

Determines the number of TdxMasterViewLevel objects in a TdxMasterView object.

property AbsoluteLevelCount : Integer;

Description

Use the AbsoluteLevelCount property to access the number of level objects in a TdxMasterView control.

ReadOnly Property


TdxMasterView.AbsoluteLevels

TdxMasterView          See Also

Determines a level via its absolute index.

property AbsoluteLevels[Index: Integer] : TdxMasterViewLevel;

Description

Use the AbsoluteLevels property to access a specific level.  The Index parameter determines its absolute index among all other levels.  The first MasterView level has an index of 0 and subsequent levels are numbered sequentially.   The index of the last level is one less than the value of the AbsoluteLevelCount property.

ReadOnly Property


TdxMasterView.ArrowsColor

TdxMasterView

Specifies the color of arrows that appear when moving a column.

property ArrowsColor : TColor;

Description

When a user moves a column at runtime, two arrows indicate available positions wherein to place a column.  Use this property to set or access arrow color.  The default value for ArrowColor is clLime.


TdxMasterView.CustomizationForm

TdxMasterView          See Also

Specifies the customization form for columns & options.

property CustomizationForm : TWinControl;

Description

Use the customization form in order to provide users with the ability to customize MasterView columns and set necessary options for any existing level.  The TdxMasterView Customizing property activates the column customization form, wherein a user can select a proper level via a combo box and thus customize views.

Columns customization page	Options customization page

ReadOnly Property


TdxMasterView.CustomizationFormLevel

TdxMasterView          See Also

Specifies the active MasterView level in the customization form.

property CustomizationFormLevel : TdxMasterViewLevel;

Description

Use the CustomizationFormLevel property to access a previously created level and set visible columns and view options.  A user can also select the right level via the combo box in the customization form.


TdxMasterView.CustomizationFormPos

TdxMasterView          See Also

Specifies the position of the customization form.

property CustomizationFormPos: TPoint;

Description

Use this property to determine the left topmost point of the customization form on screen, in screen coordinates.


TdxMasterView.CustomizationFormRowCount

TdxMasterView          See Also

Determines the number of rows in the visible area of the customization form.

property CustomizationFormRowCount : Integer;

Description

Use the customization form to provide users with the ability to customize MasterView columns and set necessary options for any existing level.  The CustomizingRowCount property defines the appearance of this window specifying how many rows are visible at a given moment in the customization form.


TdxMasterView.Customizing

TdxMasterView          See Also

Determines whether a user is customizing the control’s view.

property Customizing : Boolean;

Description

Use the Customizing property to activate/deactivate the customization form.


TdxMasterView.FocusedIndex

TdxMasterView          See Also

Specifies the index of a focused node.

property FocusedIndex : Integer;

Description

Specifies the absolute position of a focused node.  The index of the first node is 0.  Use this property to focus a node by its index.


TdxMasterView.FocusedNode

TdxMasterView          See Also

Sets or returns a focused node.

property FocusedNode : TdxMasterViewNode;

Description

Determines a focused node in a MasterView control.  If a node is focused, a rectangle is drawn around it.


TdxMasterView.HighlightStyle

TdxMasterView           See Also

Determines the style of highlighted nodes.

property HighlightStyle : TdxMasterViewStyle;

Description

Specifies the style of selected nodes.  Selected nodes use this style when the MasterView control has focus.

highlight style
inactive style


TdxMasterView.InactiveStyle

TdxMasterView           See Also

Determines inactive style.

property InactiveStyle : TdxMasterViewStyle;

Description

Specifies the style of selected nodes.  Selected nodes use this style when the MasterView control has lost focus and the movHideSelection option of the OptionsView property is active.

highlight style
inactive style


TdxMasterView.IniFileName

TdxMasterView          See Also

Specifies the name of an INI file in which to store column settings for the ExpressMasterView.

property IniFileName : string;

Description

If the mobStoreInIniFile option is active (OptionsBehavior property), ExpressMasterView settings are stored in an INI file.  This property sets the name of this file; the ‘ini’ extension isn’t added by the component to the file name.


TdxMasterView.Items

TdxMasterView           See Also

Specifies a MasterView node.

property Items : TdxMasterViewNode;

Description

The Items property allows a user to access all nodes and their properties and methods.  Item is a single TdxMasterNode object that describes the MasterView in its own Items property.  The Items property of the TdxMasterView can be considered as an indexed array of nodes that describe individual nodes in a menu. Instead of writing:

FirstNode := MasterView.Items.Items[0];

use,

FirstNode := MasterView.Items[0];


TdxMasterView.LeftPos

TdxMasterView

Determines the MasterView position relative to the client window.

property LeftPos : Integer;

Description

As a rule, the summary width of the MasterView columns is greater than the width of the control window.  If a user scrolls the control to the right, the left portion is hidden.  This property determines the distance between the first column and the client window in pixels.


TdxMasterView.Levels

TdxMasterView

Specifies root level.

property Levels : TdxMasterViewLevel;

Description

The Levels property allows a user to access all levels and their properties and methods.  Each MasterView level has a tree-type structure.  The root level is used internally and has no graphical representation in the control, but supports all other levels.


TdxMasterView.MovingColumn

TdxMasterView          See Also

Specifies the column being moved.

property MovingColumn : TdxMasterViewColumn;

Description

Because the MasterView component offers a wide range of customization features, your end-users can move columns at runtime.  This property allows you to track whether a column is being moved.


TdxMasterView.MovingColumnNode

TdxMasterView          See Also

Specifies the node to which the column being moved belongs.

property MovingColumnNode : TdxMasterViewNode;

Description

Because the MasterView component offers a wide range of customization features, your end-users can move columns at runtime.  Though all columns and their layouts are identical for nodes at the same level, a user can track the exact node where a column is moved.


TdxMasterView.OptionsBehavior

TdxMasterView          See Also          Example

Specifies behavioral properties of the ExpressMasterView.

type

 TdxMasterViewOptionBehavior = (mobAnsiCompareStrOnGrouping, mobAnsiCompareStrOnSorting, mobCaseInsensitiveGrouping, mobCaseInsensitiveSorting, mobMultiSelect, mobShowHourGlassCursor, mobStoreInIniFile, mobStoreInRegistry, mobUseIndent);

TdxMasterViewOptionsBehavior = set of TdxMasterViewOptionBehavior;

property OptionsBehavior : TdxMasterViewOptionsBehavior;

Description

Available values include:

Value	Meaning
mobAnsiCompareStrOnGrouping	When active, the MasterView control uses Windows locale settings to compare strings when grouping nodes.  This option is useful when MasterView cells contain native language text.
mobAnsiCompareStrOnSorting	When active, the MasterView control uses Windows locale settings to compare strings when sorting nodes.  This option is useful when MasterView cells contain native language text.
mobCaseInsensitiveGrouping	Used to sort MasterView nodes.  If active, grouping is case insensitive.
mobCaseInsensitiveSorting	Used to sort MasterView nodes.  If active, sorting is case insensitive.
mobMultiSelect	Determines whether more than one node can be selected at a time.
mobShowHourGlassCursor	Determines whether the ExpressMasterView changes the cursor to crHourglass when performing long data processing events.
mobStoreInIniFile	Determines whether to store ExpressMasterView layout settings in an INI file specified by the IniFileName property.
mobStoreInRegistry	When active, ExpressMasterView layout settings are stored in the Registry key specified by the RegistryPath property.
mobUseIndent	When active, the indent region can be used to select node(s).

The default values for the OptionsBehavior property include: [mobUseIndent].


TdxMasterView.OptionsDB

TdxMasterView          See Also          Example

Specifies options used to work with a dataset.

type

  TdxMasterViewOptionDB = (modSyncMove);

TdxMasterViewOptionsDB = set of TdxMasterViewOptionDB;

property OptionsDB : TdxMasterViewOptionsDB;

Description

Available values include:

Value	Meaning
modSyncMove	When active, the ExpressMasterView and dataset navigation are synchronized.  Thus, changing the active record in the MasterView control is reflected in the dataset and vice versa.

The default values for the OptionsDB property include: [modSyncMove].


TdxMasterView.OptionsView

TdxMasterView          See Also          Example

Specifies display properties of the ExpressMasterView.

type

 TdxMasterViewOptionView = (movAnimation, movAutoColumnWidth, movDrawEndEllipsis, movHideFocusRect, movHideSelection, movKeepColumnWidths, movTransparentDragAndDrop, movUseBitmap, movUseBitmapToDrawPreview);

 TdxMasterViewOptionsView = set of TdxMasterViewOptionView;

property OptionsView : TdxMasterViewOptionsView;

Description

Available values include:

Value	Meaning
movAnimation	When active, node collapse and expansion are animated.
movAutoColumnWidth	When active, the ExpressMasterView control changes all column widths in order to display all columns on screen thus eliminating the need for a horizontal scroll bar.
movDrawEndEllipsis	The data width in a column maybe greater than a column's width.  When set, ellipsis (‘…’) are drawn to indicate that data does not fit inside the boundaries of a column.
movHideFocusRect	Specifies whether to draw a rectangle around a focused node.  When set, the bound rectangle around a focused node is hidden.
movHideSelection	Determines whether the MasterView control offers visual indication of selected items when focus shifts to another control.  If active, Selection is displayed only when the MasterView control is focused.
movKeepColumnWidths	When active, the ExpressMasterView does not change column width back to the initial settings after deactivating the movAutoColumnWidth option.
movTransparentDragAndDrop	When active, the column header is transparent while performing Drag&Drop actions.
movUseBitmap	When active, the MasterView control uses a temporary bitmap to draw node cells.  It decreases flickers, but draws cells a bit slower.
movUseBitmapToDrawPreview	When active, the MasterView control uses a temporary bitmap to draw the preview section.  It decreases flickers, but draws cells a bit slower.

The default values for the OptionsView property include:

[movAnimation,movHideFocusRect,movKeepColumnWidths,movTransparentDragAndDrop,movUseBitmapToDrawPreview].


TdxMasterView.PartVisibleItemCount

TdxMasterView          See Also

Determines the number of visible nodes.

property PartVisibleItemCount : Integer;

Description

Use the PartVisibleItemCount property to determine the number of nodes visible on screen.  If only a portion of a node is visible, it is counted as well.


TdxMasterView.RegistryPath

TdxMasterView          See Also

Specifies the Registry key wherein ExpressMasterView column settings are saved.

property RegistryPath : string;

Description

If the mobStoreInRegistry option is active (OptionsBehavior property), the ExpressMasterView saves column settings to the Registry.  Use this property to set the Registry key.  If the RegistryPath is empty, the MasterView does not save its column settings to the Registry.


TdxMasterView.SelectedItemCount

TdxMasterView          See Also

Determines the number of selected TdxMasterViewNode objects in a TdxMasterView object.

property SelectedItemCount : Integer;

Description

Use the SelectedItemCount property to access the number of selected nodes in a TdxMasterView object.

ReadOnly Property


TdxMasterView.SelectedItems

TdxMasterView          See Also

Determines a node via its index.

property SelectedItems[Index: Integer] : TdxMasterViewNode;

Description

Use the SelectedItems property to access a specific node.  The Index parameter determines its absolute index among all selected nodes.  The first selected  MasterView node has an index of 0 and subsequent nodes are numbered sequentially.   The index of the last selected node is one less than the value of the SelectedItemCount property.

ReadOnly Property


TdxMasterView.SelectedItemsList

TdxMasterView          See Also

Returns the list of selected nodes.

property SelectedItemsList : TdxMasterViewList;

Description

Use this property to obtain the TdxMasterViewList that contains the list of selected MasterView nodes.

ReadOnly Property


TdxMasterView.SizingColumn

TdxMasterView

Specifies the column which has been sized.

property SizingColumn : TdxMasterViewColumn;

Description

Use the SizingColumn property to access the currently sized column.


TdxMasterView.State

TdxMasterView

Determines a MasterView's state.

type

 TdxMasterViewState = (mvsCtrlClick, mvsIndentClick, mvsAnchorSelected, mvsSelectPeriod, mvsColumnSizing, mvsColumnMoving, mvsScrolling);

TdxMasterViewStates = set of TdxMasterViewState;

property State : TdxMasterViewStates;

Description

The State property returns the current state of a MasterView control.  The following table describes state indicators:

Value	Meaning
mvsCtrlClick	The Ctrl key is pressed.
mvsIndentClick	The indent region is clicked (see the picture below).
mvsAnchorSelected	An anchor (the first selected node) is still selected after multiple nodes are selected.
mvsSelectPeriod	Multiple nodes are selected.
mvsColumnSizing	A user changes the size of a column.
mvsColumnMoving	A user moves a column.
mvsScrolling	A user scrolls a MasterView control.

ReadOnly Property


TdxMasterView.StyleCount

TdxMasterView          See Also

Determines the number of styles.

property StyleCount : Integer;

Description

Use the StyleCount property to obtain the number of styles previously created.

ReadOnly Property


TdxMasterView.Styles

TdxMasterView          See Also

Determines a style via its index.

property Styles[Index: Integer] : TdxMasterViewStyle;

Description

Use the Styles property to access a specific style.  The Index parameter determines its absolute index among all created styles.  The first selected MasterView style has an index of 0 and subsequent styles are numbered sequentially.   The index of the last style is one less than the value of the StyleCount property.  To create a new style, simply open the Designer window’s Styles tab:

ReadOnly Property


TdxMasterView.TopIndex

TdxMasterView          See Also

Determines the index of the topmost visible node.

property TopIndex : Integer;

Description

Specifies the absolute index of the topmost visible node within a MasterView control window.  You can also refer to the topmost visible node via the TopNode property.


TdxMasterView.TopNode

TdxMasterView          See Also

Determines the topmost visible nodes within a MasterView control window.

property TopNode : TdxMasterViewNode;

Description

Specifies the topmost node within a MasterView control.  Vertical navigation through MasterView nodes changes the TopNode property.


TdxMasterView.VisibleItemCount

TdxMasterView          See Also

Determines the number of visible nodes.

property VisibleItemCount : Integer;

Description

Use the VisibleItemCount property to determine the number of visible nodes on screen.  Unlike the PartVisibleItemCount property, only the entire visible nodes are counted.


TdxMasterView.ApplyBestFit

TdxMasterView

Applies the best fit to a column.

procedure ApplyBestFit(Level: TdxMasterViewLevel; Column: TdxMasterViewColumn);

Description

Use this method to set the proper width for a specified column.  The Level parameter determines the MasterView level to which a column belongs.  If column width is too small, it is enlarged.  If it is too large, it is set to a lesser value.  If the Column paramter is nil, the fit procedure is applied to all columns at this level.  If the Column and Level parameters are nil, the fit procedure is applied to all MasterView columns.


TdxMasterView.BeginLayout

TdxMasterView          See Also          Example

Disables record reloading.

procedure BeginLayout;

Description

Calling the BeginLayout method disables reloading of dataset records.  If the BeginLayout method has been called, no changes are reflected until calling the EndLayout method.  The BeginLayout and EndLayout methods prevent numerous updates of the MasterView control. Every call of the BeginLayout method increases the internal counter by one.  Every call of the EndLayout method decreases the internal counter by one.

Note: Make certain that you call the EndLayout method after each call of the BeginLayout method.  Use these methods in the same procedure.


TdxMasterView.BeginSelection

TdxMasterView          See Also

 Prevents multiple generation of the OnSelectionChanged event.

procedure BeginSelection;

Description

The BeginSelection and EndSelection methods work together to prevent multiple generation of the OnSelectionChanged event.  Every call of the BeginSelection method increases the internal counter by one.  Every call of the EndSelection method decreases this counter by one.  The OnSelectedCountChange event is generated if the internal counter is 0.

Note: Make certain that you call the EndSelection method after each call of the BeginSelection method to successfully use the ExpressMasterView.


TdxMasterView.BeginUpdate

TdxMasterView          See Also

Disables MasterView refresh operations.

procedure BeginUpdate;

Description

Calling the BeginUpdate method disables MasterView repainting.  If the BeginUpdate procedure has been called, any changes to nodes (or columns) are not refreshed until calling the EndUdpate method.  The BeginUpdate and EndUpdate methods work together to prevent numerous updates of the MasterView control when adding nodes or columns or regrouping.

Remember to call the EndUpdate method after calling BeginUpdate.  Every call of the BeginUpdate method increases the internal counter by one.  Every call of the EndUpdate decreases this counter by one.  The MasterView control can refresh itself only when the internal counter is 0.  Assume you need to add several columns programmatically.  If you do not use the BeginUpdate and EndUpdate methods, the MasterView redraws itself as many times as the number of columns added.  Instead of prolonged delays, you can use the BeginUpdate method before adding the first column and the EndUpdate method after adding the last column; thus, the control redraws itself only once.


TdxMasterView.CancelLayout

TdxMasterView          See Also          Example

Enables record reloading and refresh operations of the MasterView control.

procedure CancelLayout;

Description

The CancelLayout method nulls the internal counter of the BeginLayout and EndLayout methods and calls the CancelUpdate method.  Call this method to enable record loading regardless of the appropriate internal counter.


TdxMasterView.CancelUpdate

TdxMasterView          See Also

Enables refresh operations of the MasterView control.

procedure CancelUpdate;

Description

The CancelUpdate method nulls the internal counter of the BeginUpdate and EndUpdate methods.  Call this method to enable refresh operations regardless of the appropriate internal counter.


TdxMasterView.ClearSelection

TdxMasterView           See Also

Clears selection within a MasterView control.

procedure ClearSelection;

Description

Use this method to deselect all selected nodes in a MasterView control.

Note:	If there are no selected nodes after calling the ClearSelection method, the control retains focus.


TdxMasterView.Create

TdxMasterView

Creates an instance of type TdxMasterView.

constructor Create(AOwner: TComponent); override;

Description

Creates and initializes the TdxMasterView.  After calling the inherited contstructor, the Create method sets all MasterView properties to their default values.


TdxMasterView.CreateStyle

TdxMasterView          See Also

Creates an instance of type TdxMasterViewStyle.

type

 TdxMasterViewStyleClass = class of TdxMasterViewStyle;

function CreateStyle(AStyleClass: TdxMasterViewStyleClass): TdxMasterViewStyle;

Description

This method creates a new style for a MasterView control and adds it to the list of existing styles. It is designed for internal use.


TdxMasterView.DeleteSelection

TdxMasterView           See Also

Removes selected nodes from a MasterView control.

procedure DeleteSelection;

Description

Use the DeleteSelection method to delete all selected nodes from the MasterView control.

Note: If there are no selected nodes, the MasterView control retains focus.


TdxMasterView.Destroy

TdxMasterView

destructor Destroy;  override;

Description

Destroys an instance of the TdxMasterView type and releases any allocated memory.


TdxMasterView.EndLayout

TdxMasterView          See Also

Enables records reloading.

procedure EndLayout;

Description

Calling the EndLayout method enables reloading of dataset records.  The BeginLayout and EndLayout methods prevent numerous updates of the MasterView control.  Every call of the BeginLayout method increases the internal counter by one.  Every call of the EndLayout method decreases the internal counter by one.

Note: Make ceratin that you call the EndLayout method after each call of the BeginLayout method in the same procedure.


TdxMasterView.EndSelection

TdxMasterView          See Also

This method is used to prevent multiple generation of the OnSelectionChanged event.

procedure EndSelection;

Description

The BeginSelection and EndSelection methods work together to prevent multiple generation of the OnSelectionChanged event.  Every call of the BeginSelection method increases the internal counter by one.  Every call of the EndSelection method decreases this counter by one.  The EndSelection method generates the OnSelectionChanged event if the internal counter is 0.

Note: Make certain that you call the EndSelection method after each call of the BeginSelection method.


TdxMasterView.EndUpdate

TdxMasterView          See Also

Enables refresh operations of the MasterView control.

procedure EndUpdate;

Description

The BeginUpdate and EndUpdate methods work together to prevent numerous updates of a MasterView control when adding nodes or columns.  Make certain to call the EndUpdate method after calling BeginUpdate.  Every call of the BeginUpdate method increases the internal counter by one.  Every call of the EndUpdate method decreases the internal counter by one.  The MasterView control refreshes itself only when the internal counter is 0.


TdxMasterView.FocusNode

TdxMasterView          See Also

Focuses a node.

procedure FocusNode(Node: TdxMasterViewNode; ChangeSelection: Boolean);

Description

Call the FocusNode method to move focus to a node specified via the Node parameter.  The ChangeSelection parameter determines whether to move selection to the newly focused node: when True - the focused node is selected; when False - selection is not moved.


TdxMasterView.FullCollapse

TdxMasterView          See Also

Collapses all nodes within a MasterView control.

procedure FullCollapse;

Description

This method performs full collapse operations of MasterView nodes.  Call the FullCollapse method to hide all nodes in the control except for first level nodes. (The Root level is a zero level).  All buttons change from '-' to '+'.


TdxMasterView.FullExpand

TdxMasterView          See Also

Expands all nodes within a MasterView control.

procedure FullExpand;

Description

This method performs full expand operations of MasterView nodes.  Call the FullExpand method to display all nodes in the control.  All buttons change from '+' to '-'.


TdxMasterView.GetAbsoluteItem

TdxMasterView          See Also

Returns a node by its absolute index.

function GetAbsoluteItem(Index: Integer): TdxMasterViewNode;

Description

The GetAbsoluteItem method is used internally to access a node by its absolute index in the AbsolouteItems property that contains the list of all nodes.


TdxMasterView.GetHitTestInfo

TdxMasterView

Returns information on a region that covers a point with specified coordinates.

type

 TdxMasterViewHitTestCode = (htNone, htLeftSpace, htRightSpace, htIndent, htGroupByBox, htHeader, htHeaderLeftEdge, htHeaderRightEdge, htHeaderTopEdge, htHeaderBottomEdge, htContent, htExpandButton, htContentLeftEdge, htContentRightEdge, htPreview, htFooter, htCustomizationForm, htOther);

function GetHitTestInfo(const P: TPoint; var Node: TdxMasterViewNode;      var Column: TdxMasterViewColumn; var RowIndex, ColIndex: Integer): TdxMasterViewHitTestCode;

Description

Use the GetHitTestInfo method to determine to which region within the MasterView control a specified point belongs.  This method provides the following parameters:

P	Coordinates of a point.
Node	Determines the node which contains a specified point.
Column	Determines the column which contains a specified point.
RowIndex	Index of a row among other rows of a node (index is zero-based).
ColIndex	Index of a column.

The TdxMasterViewHitTestCode type provides the following values to determine which area contains a specified point:

Value	Meaning
htNone	A point does not belong to any region within the MasterView control.
htLeftSpace	A point belongs to the indent area to the left if the mobUseIndent option of the OptionsBehavior is inactive.
htRightSpace	A point belongs to the empty region to the right of the last column.
htIndent	A point belongs to the indent area.
htGroupByBox	A point belongs to a group panel.
htHeader	A point belongs to the column header.
htHeaderLeftEdge	A point belongs to the left edge of the column header.
htHeaderRightEdge	A point belongs to the right edge of the column header.
htHeaderTopEdge	A point belongs to the top edge of the column header.
htHeaderBottomEdge	A point belongs to the bottom edge of the column header.
htContent	A point belongs to a cell.
htExpandButton	A point belongs to the ‘+’ or ‘-‘ buttons.
htContentLeftEdge	A point belongs to the left edge of a cell.
htContentRightEdge	A point belongs to the right edge of a cell.
htPreview	A point belongs to the preview region.
htFooter	A point belongs to the footer region.
htCustomizationForm	A point belongs to the customization form window.
htOther	A point belongs to all other areas of the MasterView control (for instance, row separators).


TdxMasterView.Invalidate

TdxMasterView

Repaints a MasterView control.

procedure Invalidate; override;

Description

The Invalidate method is used internally to entirely repaint a MasterView control.


TdxMasterView.LoadFromRegIniFile

TdxMasterView          See Also

Loads ExpressMasterView layout settings from a specified INI file or from the Registry.

type

 TdxMasterViewRegIniFileMode = (riIniFile, riRegistry);

procedure LoadFromRegIniFile(const AFileName: string; AMode: TdxMasterViewRegIniFileMode);

Description

Use the LoadFromRegIniFile method to load MasterView settings.  This method allows loading information from an INI file or from the Registry depending on the AMode parameter.

The AMode parameter values include:

Value	Meaning
riIniFile	The method loads settings from an INI file.
riRegistry	The method loads settings from the Registry.

The AFileName parameter specifies the name of the INI file or the Registry path from which to load settings; the ‘ini’ extension is not added to the file’s name specified by the AFileName property.  To store settings in the Registry, the mobStoreInRegistry option of the OptionsBehavior property must be active.  To store settings in an INI file, the mobStoreInIniFile option of the OptionsBehavior property must be active.

The LoadFromRegIniFile method allows loading different MasterView settings for different users.  For instance, an application can be used by different users on the same machine.  If you wish to save MasterView settings for each user to a separate registry key, deactivate the mobStoreInRegistry option and perform load settings based on individual login info.  When a program starts, users enter their login names.  The application obtains the registry path for the current user (via the GetRegPathByUserInfo function - not implemented in the sample below) and loads MasterView settings:

// Delphi

procedure TForm1.FormCreate(Sender: TObject);

begin

  . . . // Getting login info

  // Obtains the Registry key for the current user

  MasterView.RegistryPath := GetRegPathByUserInfo(LogInfo);

  // Loads custom user grid settings

  MasterView.LoadFromRegIniFile(MasterView.RegistryPath, riRegistry);

  // Forces ExpressMasterView to save settings into the Registry

  // when the application terminates

 MasterView.OptionsBehavior := MasterView.OptionsBehavior + [mobStoreInRegistry];

  . . .

end;

// C++Builder

void __fastcall TForm1::FormCreate(TObject * Object)

{

  . . . // Getting login info

  // Obtains the Registry key for the current user

 MasterView ->RegistryPath = GetRegPathByUserInfo(LogInfo);

  // Loads custom user grid settings

 MasterView ->LoadFromRegIniFile(MasterView ->RegistryPath, riRegistry);

  // Forces ExpressMasterView to save settings to the Registry

  // when the application terminates

 MasterView ->OptionsBehavior = MasterView ->OptionsBehavior << mobStoreInRegistry;

  . . .

}


TdxMasterView.NodeFromID

TdxMasterView          See Also

Returns a MasterView node by its 'ID' value.

function NodeFromID(ALevel: TdxMasterViewLevel; const AID: Variant): TdxMasterViewNode;

Description

Every data node in a MasterView control corresponds to a dataset record.  The NodeFromID method returns a node which corresponds to the record with the unique value of the ID field(s) equal to AID.  The search is performed within the level specified by the ALevel parameter.


TdxMasterView.NodeFromKeyValue

TdxMasterView          See Also

Returns a MasterView node by its key value.

function NodeFromKeyValue(ALevel: TdxMasterViewLevel; AChildIndex: Integer; const AKeyValue: Variant): TdxMasterViewNode;

Description

Every data node in a MasterView control corresponds to a dataset record.  Master-detail relationships are established via a Key value (MasterKey at the parent level, DetailKey at the child level).  The NodeFromKeyValue method returns a MasterView node which corresponds to the record with the Key field value equal to AKeyValue.  As the parent level may contain several child levels, its key values represent a zero-based array.  The AChildIndex parameter of this method specifies the element of this array (at the child level).  The ALevel parameter specifies the level at which the search is performed.


TdxMasterView.SaveToRegIniFile

TdxMasterView          See Also

Saves ExpressMasterView column settings to an INI file or to the Registry.

type

 TdxMasterViewRegIniFileMode = (riIniFile, riRegistry);

procedure SaveToRegIniFile(const AFileName: string; AMode: TdxMasterViewRegIniFileMode);

Description

Use the SaveToRegIniFile method to save MasterView column settings.  This method allows you to save information both to an INI file or to the Registry depending on the AMode parameter.

The AMode parameter values include:

Value	Meaning
riIniFile	The method saves settings to an INI file.
riRegistry	The method saves settings to the Registry.

The AFileName parameter specifies the name of an INI file or the Registry path wherein to store settings; the ‘ini’ extension is not added to the file’s name specified by the AFileName property.  To store settings in the Registry, the mobStroeInRegistry option of the OptionsBehavior property must be active.  To store settings in an INI file, the mobStroeInIniFile option of the OptionsBehavior property must be active.


TdxMasterView.SelectItems

TdxMasterView          See Also

Selects/deselects a range of nodes.

procedure SelectItems(FromIndex, ToIndex: Integer; Select: Boolean);

Description

Call the SelectItems method to select or deselect all nodes between the FromIndex and ToIndex parameters.  These parameters represent the absolute indexes of boundary nodes.  The Select parameter determines whether to select or deselect a range of nodes: True - select; False - deselect.


TdxMasterView.ShowFocusedNode

TdxMasterView          See Also

Displays the currently focused node.

procedure ShowFocusedNode;

Description

Call the ShowFocusedNode method to display the currently focused node on screen.  If a focused node is collapsed and invisible, than its first visible parent node is displayed.


TdxMasterView.UpdateData

TdxMasterView

Updates the contents of a MasterView control.

procedure UpdateData;

Description

The UpdateData method entirely refreshes the MasterView control using currently active options.  For instance, if the lodSmartLoad option of the OptionsDB property of the TdxMasterViewLevel object is active, then collapsed nodes are not reloaded.


TdxMasterView.OnAfterColumnMoving
OnAfterColumnMoving Event

TdxMasterView          See Also

Occurs when a user has dropped a column header onto the MasterView control.

type

 TdxMVColumnMovingEvent = procedure(Sender: TdxMasterView; Column: TdxMasterViewColumn; P: TPoint; RowIndex, ColIndex: Integer; InsertIntoNewRow: Boolean; var Accept: Boolean) of object;

property OnAfterColumnMoving: TdxMVColumnMovingEvent;

Description

Write an OnAfterColumnMoving event handler to perform specific actions when a user finishes moving a column.  The Sender parameter is a MasterView control that contains the dragged column header.  The AColumn parameter specifies the dragged column.  Set the Accept parameter to False within the OnAfterColumnMoving event handler to reject column movement.  Set the Accept parameter to True in order to allow users to drop the dragged column.  The P parameter determines the point at which a column is dropped.  The InsertIntoNewRow determines whether to create a new row for this column: Set to True - the column is placed onto a new row; set to False - the column is placed onto an existing row.  The RowIndex parameter determines the index of a row onto which a column header is placed.  The ColIndex parameter determines the index of a column onto which a column header is placed.  If the RowIndex and ColIndea are equal to -1, then this column is placed onto the group panel.  All indexes are zero-based.


TdxMasterView.OnBeforeColumnMoving
OnBeforeColumnMoving Event

TdxMasterView          See Also

Occurs when a user begins dragging a column header within a MasterView control.

type

 TdxMVColumnMovingEvent = procedure(Sender: TdxMasterView; Column: TdxMasterViewColumn; P: TPoint; RowIndex, ColIndex: Integer; InsertIntoNewRow: Boolean; var Accept: Boolean) of object;

property OnBeforeColumnMoving: TdxMVColumnMovingEvent;

Description

Write an OnBeforeColumnMoving event handler to perform specific actions when a user starts moving a column.  The Sender parameter is a MasterView control that contains the dragged column header.  The AColumn parameter specifies the dragged column.  Set the Accept parameter to False within the OnBeforeColumnMoving event handler to disable column movement.  Set the Accept parameter to True to allow column movment.  The P parameter determines the point from which a column is dragged.  The InsertIntoNewRow has no effect in this event.  The RowIndex parameter determines the index of a row onto which the column header is placed.  The ColIndex parameter determines the index of a column onto which the column header is placed.  If the RowIndex and ColIndea are equal to –1, then this column is placed onto a group panel.  All indexes are zero-based.


TdxMasterView.OnColumnMoving
OnColumnMoving Event

TdxMasterView          See Also

Occurs when a user drags a column header over a MasterView control.

type

  TdxMVColumnMovingEvent = procedure(Sender: TdxMasterView; Column: TdxMasterViewColumn; P: TPoint; RowIndex, ColIndex: Integer; InsertIntoNewRow: Boolean; var Accept: Boolean) of object;

property OnColumnMoving: TdxMVColumnMovingEvent;

Description

Write an OnColumnMoving event handler to perform specific actions when moving a column.  The Sender parameter is the MasterView control that contains the dragged column header.  The AColumn parameter specifies the dragged column.  Set the Accept parameter to False within the OnBeforeColumnMoving event handler to disable column dropping.  Set the Accept parameter to True to allow users to drop columns.  The P parameter determines the coordinates of the dragged column.  The InsertIntoNewRow parameter determines whether to create a new row for this column: Set to True - the column is placed onto a new row; set to False - the column is placed onto an existing row.  The RowIndex parameter determines the index of a row over which the column header is dragged.  The ColIndex parameter determines the index of a column over which the column header is dragged.  If RowIndex and ColIndex are equal to –1, the column is placed onto the group panel.  All indexes are zero-based.


TdxMasterView.OnCustomizing
OnCustomizing Event

TdxMasterView

Occurs when a user opens or closes the customization window.

type

  TdxMVCustomizingEvent = procedure(Sender: TdxMasterView; Showing: Boolean) of object;

property OnCustomizing: TdxMVCustomizingEvent;

Description

Write an OnCustomizing event handler to perform specific actions when the customization window is opened or closed.  The Showing parameter specifies whether this window is open (True) or closed (False).


TdxMasterView.OnFocusNode
OnFocusNode Event

TdxMasterView          See Also

Occurs when focusing a node.

type

  TdxMVFocusNodeEvent = Procedure(Sender: TdxMasterView; PrevNode,    CurNode: TdxMasterViewNode) of object;

property OnFocusNode: TdxMVFocusNodeEvent;

Description

Write an OnFocusNode event handler to perform specific actions when a new node is focused.  The PrevNode parameter determines the previously focused node.  The CurNode parameter determines the node that receives focus.


TdxMasterView.OnLeftPosChanged
OnLeftPosChanged Event

TdxMasterView          See Also

Occurs when changing the LeftPos property.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnLeftPosChanged: TNotifyEvent;

Description

The LeftPos property changes when a user horizontally scrolls the MasterView list window.  Write an OnLeftPosChanged event handler to perform specific actions during horizontal scrolling of the MasterView window.


TdxMasterView.OnSelectionChanged
OnSelectionChanged Event

TdxMasterView          See Also

Occurs when changing selected node(s).

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnSelectionChanged: TNotifyEvent;

Description

Write an OnSelectionChanged event handler to perform specific actions when selecting/deselecting node(s).


TdxMasterView.OnSelectNode
OnSelectNode Event

TdxMasterView          See Also

Occurs when selecting a node.

type

  TdxMVSelectNodeEvent = procedure(Sender: TdxMasterView; Node: TdxMasterViewNode; var Allow: Boolean) of object;

property OnSelectNode: TdxMVSelectNodeEvent;

Description

Write an OnSelectNode event handler to perform specific actions when selecting a node.  The Node parameter determines a node which is about to be selected.  The Allow parameter specifies whether the selection is enabled (True) or disabled (False).


TdxMasterView.OnTopNodeChanged
OnTopNodeChanged Event

TdxMasterView          See Also

Responds to changes at the topmost visible node.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnTopNodeChanged: TNotifyEvent;

Description

This event occurs when changing the topmost visible node in a MasterView control.  For instance, the OnTopNodeChanged event is generated when a user scrolls the ExpressMasterView control.


TdxMasterViewColumn
TdxMasterViewColumn Object

Hierarchy          Properties          Methods          Events

The TdxMasterViewColumn is the base class for MasterView columns.

Unit

dxMasterView

Declaration

TdxMasterViewColumn = class(TComponent);

Description

The TdxMasterViewColumn class defines columns in a MasterView control.  Use its methods, properties and events to customize the appearance of a specific column.  You can access a given column via its Name or associated FieldName.  This object represent a column that contains simple text.


Hierarchy

TComponent

     |


TdxMasterViewColumn Properties

TdxMasterViewColumn          Legend

In TdxMasterViewColumn

Alignment

AssignedValues

Caption

ColIndex

ContentStyle

Control

Field

FieldName

FooterAlignment

FooterStyle

GroupIndex

HeaderAlignment

HeaderGlyph

HeaderGlyphAlignment

HeaderStyle

Index

Level

MaxRowCount

MaxWidth

MinRowCount

MinWidth

MultiLine

Options

RowCount

RowIndex

SortIndex

SortOrder

SummaryField

SummaryFieldName

SummaryFormat

SummaryType

Visible

VisibleIndex

VisibleWidth

Width


TdxMasterViewColumn Methods

TdxMasterViewColumn          Legend

In TdxMasterViewColumn

ApplyBestFit

Assign

ChangeWidth

Create

Destroy

GetBestFitWidth

GetParentComponent

HasParent


TdxMasterViewColumn Events

TdxMasterViewColumn          Legend

In TdxMasterViewColumn

OnAfterCalcSummary

OnBeforeCalcSummary

OnCalcSummary

OnGetContentStyle

OnGetFooterStyle

OnGetHeaderStyle


TdxMasterViewColumn.Alignment

TdxMasterViewColumn

Specifies the manner in which text is aligned within a MasterView column.

type

  TAlignment = (taLeftJustify, taRightJustify, taCenter);

property Alignment : TAlignment;

Description

Use the Alignment property to specify the horizontal placement of text within a column.  A column’s text can be aligned either to the right, left, or centered.  The following values are available:

Value	Meaning	Example
taLeftJustify	Alignment to the left of a column.
taRightJustify	Alignment to the right.
taCenter	Text is centered within a column.

The default value is taLeftJustify.

Note:	This property does not effect column headers.


TdxMasterViewColumn.AssignedValues

TdxMasterViewColumn

Indicates which properties have been assigned to a MasterView column.

type

  TdxMasterViewColumnAssignedValue = (cvAlignment, cvCaption, cvFooterAlignment, cvHeaderAlignment, cvSummaryFieldName, cvWidth);

TdxMasterViewColumnAssignedValues = set of TdxMasterViewColumnAssignedValue;

property AssignedValues : TdxMasterViewColumnAssignedValues;

Description

The TdxMasterViewColumnAssignedValues type defines a set of possible state flags for the AssignedValues property.  The component uses assigned values except for default values when displaying a column.  The following table outlines the possible TdxMasterViewColumnAssignedValues values and the meaning of each flag:

Value	Meaning
cvAlignment	The Alignment property has been assigned.
cvCaption	The Caption property has been assigned.
cvFooterAlignment	The FooterAlignment property has been assigned.
cvHeaderAlignment	The HeaderAlignment property has been assigned.
cvSummaryFieldName	The SummaryFieldName property has been assigned.
cvWidth	The Width property has been assigned.


TdxMasterViewColumn.Caption

TdxMasterViewColumn

Determines the caption of a MasterView column.

property Caption : string;

Description

Specifies the text that appears for a column caption.


TdxMasterViewColumn.ColIndex

TdxMasterViewColumn          See Also

Specifies the column index of a column object among other objects at a given level.

property ColIndex: Integer;

Description

Use the ColIndex property to change the horizontal position of a column within a level.  If the ColIndex property is 0, this column is the first in this level.  If the ColIndex property of a column is -1, the ViewMode property is either set to vmHorizontal or this column is a grouped column and is placed onto the group panel.

Note:	ColIndex does not affect invisible columns.


TdxMasterViewColumn.Control

TdxMasterViewColumn

Returns the parent control.

property Control : TdxMasterView;

Description

This property is designed for internal use and returns a parent TdxMasterView instance.


TdxMasterViewColumn.ContentStyle

TdxMasterViewColumn          See Also

Determines the style of content cells for a column.

property ContentStyle : TdxMasterViewStyle;

Description

Column data cells use this style to display their contents and background on screen.


TdxMasterViewColumn.Field

TdxMasterViewColumn          See Also

Determines the field associated with a column.

property Field : TField;

Description

Every column in a data-aware grid is associated with a dataset field.  This property specifies the field that is associated with a column.


TdxMasterViewColumn.FieldName

TdxMasterViewColumn          See Also

Determines the name of a field associated with a column.

property FieldName : string;

Description

Every column of the ExpressMasterView is associated with a specific dataset field.  This property specifies the name of the associated field.


TdxMasterViewColumn.FooterAlignment

TdxMasterViewColumn          See Also

Specifies column footer text alignment.

type

  TAlignment = (taLeftJustify, taRightJustify, taCenter);

property FooterAlignment : TAlignment;

Description

Use the FooterAlignment property to specify the horizontal placement of text within a column footer.  A footer's caption can either be aligned to the right, left, or centered.  The following values are available:

Value	Meaning
taLeftJustify	Alignment to the left of the header.
taRightJustify	Alignment to the right.
taCenter	Text is centered within the header.

The default value is taLeftJistify.


TdxMasterViewColumn.FooterStyle

TdxMasterViewColumn          See Also

Determines the style of a column’s summary footer.

property FooterStyle : TdxMasterViewStyle;

Description

The summary footer of a column uses this style to display its contents on screen.


TdxMasterViewColumn.GroupIndex

TdxMasterViewColumn

Specifies the index of a column in the list of grouped columns.

property GroupIndex : Integer;

Description

Determines the index of a column among grouped columns.  If a column is not a grouped column, its GroupIndex property is equal to  -1.  If a column’s GroupIndex is 0, the column defines the topmost grouped level.

The default value is -1.


TdxMasterViewColumn.HeaderAlignment

TdxMasterViewColumn          See Also          Example

Specifies header caption alignment.

type

  TAlignment = (taLeftJustify, taRightJustify, taCenter);

property HeaderAlignment : TAlignment;

Description

Use the HeaderAlignment property to specify the horizontal placement of a caption within a column header.  Column caption can either be aligned to the right, left, or centered.  The available values include:

Value	Meaning
taLeftJustify	Alignment to the left of the header.
taRightJustify	Alignment to the right.
taCenter	Text is centered within the header.

The default value is taLeftJustify.


TdxMasterViewColumn.HeaderGlyph

TdxMasterViewColumn          See Also          Example

Specifies the bitmap drawn on a column header.

property HeaderGlyph : TBitmap;

Description

Use the HeaderGlyph property to specify the bitmap that appears on a column header.  Use the Open dialog box that appears in the Object Inspector to select a bitmap file (with a .BMP extension) or specify a bitmap file at runtime.


TdxMasterViewColumn.HeaderGlyphAlignment

TdxMasterViewColumn          See Also

Specifies header glyph alignment.

type

  TAlignment = (taLeftJustify, taRightJustify, taCenter);

property HeaderGlyphAlignment : TAlignment;

Description

Use the HeaderGlyphAlignment property to specify the horizontal placement of a picture within a column header.  A picture can either be aligned to the right, left, or centered.  The available values include:

Value	Meaning
taLeftJustify	Alignment to the left of the header.
taRightJustify	Alignment to the right.
taCenter	Text is centered within the header.

The default value is taLeftJustify.


TdxMasterViewColumn.HeaderStyle

TdxMasterViewColumn          See Also

Determines the style of a column header.

property HeaderStyle : TdxMasterViewStyle;

Description

Column headers use this style to display their contents on screen.


TdxMasterViewColumn.Index

TdxMasterViewColumn          See Also          Example

Determines the index of a column within MasterView columns.

property Index : integer;

Description

The Index property determines the index of a specific column in the Columns property at its level.  The index of the first column in the Columns property of the TdxMasterViewLevel object is 0.


TdxMasterViewColumn.Level

TdxMasterViewColumn          See Also

Determines the level of a column.

property Level : TdxMasterViewLevel;

Description

Use the Level property to access the level to which a specific column belongs.

ReadOnly Property


TdxMasterViewColumn.MaxRowCount

TdxMasterViewColumn          See Also

Specifies the maximum number of rows in a column header.

property MaxRowCount: Integer;

Description

Use the MaxRowCount property to specify column line count.  This property’s value cannot be less than the MinRowCount property’s value.


TdxMasterViewColumn.MaxWidth

TdxMasterViewColumn          See Also

Determines the maximum width of a column.

property MaxWidth : Integer;

Description

Use the MaxWidth property to specify the maximum width of a column in pixels.  If a user resizes the column width to a value greater than MaxWidth at runtime, the column width will be restored to MaxWidth.  This property value cannot be less than the MinWidth property value.


TdxMasterViewColumn.MinRowCount

TdxMasterViewColumn          See Also

Determines the minimum number of rows in a column header.

property MinRowCount: Integer;

Description

Use the MinRowCount property to determine the minimum number of rows in a column header.  By default, the MinRowCount property is 1.  This is the lowest available value for the MinRowCount property.   This property value cannot be greater than the MaxRowCount property value.


TdxMasterViewColumn.MinWidth

TdxMasterViewColumn          See Also

Determines the minimum width of a column.

property MinWidth : Integer;

Description

Use the MinWidth property to specify the minimum width of a column in pixels.  If a user resizes column width to a value less than MinWidth at runtime, the column width will be restored to MinWidth.  This property value cannot be greater than the MaxWidth property value.


TdxMasterViewColumn.MultiLine

TdxMasterViewColumn

Specifies the manner in which data appears within a MasterView control cell.

property MultiLine : Boolean;

Description

Use the MultiLine property to specify  the manner in which data appears.  By default, the MultiLine property is False.  In this instance, the portion of data that fits within the boundaries of a cell is displayed.  If the MultiLine property is set to True, then data can occupy several lines.

Value	True	False
Example


TdxMasterViewColumn.Options

TdxMasterViewColumn          Example

Specifies behavioral properties of a column in the ExpressMasterView.

type

  TdxMasterViewColumnOption = (coGrouping, coHidden, coHorSizing, coMoving, coSorting, coVerSizing, coShowCaption);

TdxMasterViewColumnOptions = set of TdxMasterViewColumnOption;

property Options : TdxMasterViewColumnOptions;

Description

Available values include:

Value	Meaning
coGrouping	When active, a level can be grouped by a given column.
coHidden	When active, a column is not displayed in the Customization window and cannot be hidden or dislayed by a user.
coHorSizing	When active, a column can be sized horizontally.
coMoving	When active, a column can be moved.
coSorting	When active, a column can be sorted.
coVerSizing	When active, a column can be sized vertically.
coShowCaption	When active, column caption is displayed.
The default values for the Options property include: [coGrouping, coHorSizing, coMoving, coSorting, coVerSizing].


TdxMasterViewColumn.RowCount

TdxMasterViewColumn          See Also

Determines the current number of rows in a column header.

property RowCount: Integer;

Description

Use the RowCount property to determine the current number of rows in a column header.  By default,  the RowCount property is 1.  This property value cannot be less than the MinRowCount property value and greater than the MaxRowCount property value.


TdxMasterViewColumn.RowIndex

TdxMasterViewColumn          See Also

Specifies the row index of a column object.

property RowIndex : Integer;

Description

Use the RowIndex property to specify the row index of a column header and column cells in a level.  The first row has an index of 0.  The maximum number of rows in a level is determined by the MaxRowCount property.


TdxMasterViewColumn.SortIndex

TdxMasterViewColumn          See Also

Determines the index of a sorted column among other sorted columns.

property SortIndex : Integer;

Description

The ExpressMasterView allows you to sort against multiple columns.  Once records in a control are sorted by a column, that column is added to the array of sorted columns.  The SortIndex property is used to determine the index of a column in the sorted columns array.  Records are first sorted by the column whose index is 0, then by the column whose index is 1, etc.  The default value for this property is -1, in this instance, the column is not sorted.


TdxMasterViewColumn.SortOrder

TdxMasterViewColumn          See Also

Specifies the order by which the ExpressMasterView sorts against a column.

type

  TdxMasterViewSortOrder = (soNone, soAscending, soDescending);

property SortOrder : TdxMasterViewSortOrder;

Description

If the SortOrder property of a column is soAscending, nodes are sorted in ascending order, if Sorted is soDescending, nodes are sorted in descending order.  soNone specifies unsorted nodes.  You should exclude the coSorting option from the Options property to disable sorting by a column (by default this option is included).


TdxMasterViewColumn.SummaryField

TdxMasterViewColumn          See Also

Specifies the MasterView field used to calculate a footer summary.

property SummaryField : TField;

Description

Footer summaries appear at the bottom of a MasterView control.

Use the SummaryType property to specify the manner in which a footer summary is calculated.  SummaryFormat allows you to specify a specific format for footer summary text.  Write an OnCalcSummary event handler to calculate a footer summary using your own algorithm.

Note:	A footer summary is only visible if a specific column is visible.


TdxMasterViewColumn.SummaryFieldName

TdxMasterViewColumn          See Also

Specifies the name of a MasterView field used to calculate a footer summary.

property SummaryFieldName : string;

Description

Footer summaries appear at the bottom of a MasterView control.

Use the SummaryType property to specify the manner in which a footer summary is calculated.  SummaryFormat allows you to specify a specific format for footer summary text.  Write an OnCalcSummary event handler to calculate a footer summary using your own algorithm.

Note:	A footer summary is only visible if a specific column is visible.


TdxMasterViewColumn.SummaryFormat

TdxMasterViewColumn          See Also

Determines the format for a summary footer.

property SummaryFooterFormat : string;

Description

Use this property to specify text format for a footer summary.  For example, your program calculates a summary for a given set of fields.  Setting the SummaryFooterFormat to ‘The total sum is $#####,##’ will give it a more elegant look.

Use the following format specifiers in a formatted string:

0	Digit placeholder.  If the formatted value does not contain a digit in this position, ‘0’ is stored.
#	Digit placeholder.  If the formatted value does not contain a digit in this position, nothing is stored.
.	Decimal point.  The first ‘.’ character in the formatted string determines the position of the decimal separator in the formatted value; other additional ‘.’ characters are ignored.  The decimal separator, stored in the output string, is determined by Windows Regional Settings.
,	Thousand separator.  If the formatted string includes one or more ‘,’ characters, it includes thousand separators.  The thousand separator, stored in the output string, is determined by Windows Regional Settings.
;	Specifies sections for positive, negative and zero values in a formatted string.


TdxMasterViewColumn.SummaryType

TdxMasterViewColumn          See Also

Determines footer summary type.

type

  TdxMasterViewSummaryType = (stNone, stSum, stMin, stMax, stCount, stAverage);

property SummaryType : TdxMasterViewSummaryType;

Description

Use this property to specify the manner in which a footer summary is calculated.  The following values are available:

Value	Meaning
stNone	Footer summary is not used.
stSum	Sums the values of footer summary fields.
stMin	Displays the minimum value of a footer summary field.
stMax	Displays the maximum value of a footer summary field.
stCount	Displays the count of nodes.  You do not need to determine the summary field.
stAvg	Displays the average value of a footer summary field.


TdxMasterViewColumn.Visible

TdxMasterViewColumn          See Also

Determines whether a column is visible.

property Visible : Boolean;

Description

Use the Visible property to get or set the visibility of a column.  If the Visible property is False, this column is hidden in the customization form.  Set the Visible property to True to display it.  The default value for this property is True.


TdxMasterViewColumn.VisibleIndex

TdxMasterViewColumn          See Also

Determines whether a column is visible.

property Visible : Boolean;

Description

Use the Visible property to get or set the visibility of a column.  If the Visible property is False, this column is hidden.  Set the the Visible property to True to display it.


TdxMasterViewColumn.VisibleWidth

TdxMasterViewColumn          See Also

Specifies visible column width.

property VisibleWidth : Integer;

Description

Use the VisibleWidth property internally to determine the visible width of a MasterView column, in pixels.  You should distinguish between the Width and VisibleWidth properties.  The Width property can be set by the ObjectInspector and the VisibleWidth property is designed for internal use.  When a column includes a collapse/expand button, the VisibleWidth property determines the entire width of this column and the Width property determines the width that is used to display a field’s contents.  When implementing the AutoWidth feature, the Width property values do not change and the VisibleWidth property values contain calculated column widths.


TdxMasterViewColumn.Width

TdxMasterViewColumn          See Also

Specifies column width.

property Width : Integer;

Description

Use the Width property to get or set the width of a MasterView column, in pixels.  Column width cannot be less than the MinWidth property or greater than the MaxWidth property.  If you specify a Width value less than that of MinWidth, Width is automatically enlarged.  If you specify a Width value greater than that of MaxWidth, Width is automatically shrunk.

You should distinguish between the Width and VisibleWidth properties.  The Width property can be set by the ObjectInspector and the VisibleWidth property is designed for internal use.  When a column includes a collapse/expand button, the VisibleWidth property determines the entire width of this column and the Width property determines the width that is used to display a field’s contents.  When implementing the AutoWidth feature, the Width property values do not change and the VisibleWidth property values contain calculated column widths.


TdxMasterViewColumn.ApplyBestFit

TdxMasterViewColumn

Applies the best fit to a column.

procedure ApplyBestFit;

Description

Call the ApplyBestFit method to set the proper width for a column.  If column width is too small, the width is enlarged.  If it is too large, it is set to a smaller value.


TdxMasterViewColumn.Assign

TdxMasterViewColumn

Copies the contents of one TdxMasterViewColumn object to another.

procedure Assign(Source: TPersistent);  override;

Description

Call the Assign method to copy properties of one column to another column.  The standard form of a call to the Assign property is

Destination.Assign(Source);

This forces Destination to copy the contents of Source to itself.


TdxMasterViewColumn.ChangeWidth

TdxMasterViewColumn          See Also

Changes the width of a column.

procedure ChangeWidth(Value: Integer; AdjustLinkedColumns: Boolean);

Description

Call the ChangeWidth method to change the visible and actual width of a column to the value specified by the Value parameter, in pixels.  The AdjustLinkedColumn parameter determines whether this change affects other columns.  If True, other column widths are changed accordingly.  If False, other columns change only their visible width without changing the actual width.


TdxMasterViewColumn.Create

TdxMasterViewColumn

Creates an instance of type TdxMasterViewColumn.

constructor Create(AOwner: TComponent); override;

Description

Creates and initializes the TdxMasterViewColumn object.  The AOwner parameter specifies the component to which a MasterView column belongs.


TdxMasterViewColumn.Destroy

TdxMasterViewColumn

destructor Destroy;  override;

Description

Destroys a TdxMasterViewColumn instance and frees its memory.


TdxMasterViewColumn.GetBestFitWidth

TdxMasterViewColumn

Returns the width of a column used by the ApplyBestFit method for better column layout.

function GetBestFitWidth: Integer;

Description

Call the GetBestFitWidth method to specify proper column width used in the ApplyBestFit method.


TdxMasterViewColumn.GetParentComponent

TdxMasterViewColumn

Returns the parent component for a column.

function GetParentComponent: TComponent; override;

Description

Returns the ExpressMasterView to which a column belongs.


TdxMasterViewColumn.HasParent

TdxMasterViewColumn

function HasParent: Boolean;  override;

Description

This method overrides the TComponent HasParent method.  HasParent is introduced in the TComponent class for the streaming system that loads and saves components.  If the return value is True, then some other object (a parent) is responsible for writing a column to a stream.  The HasParent method of the TdxMasterViewColumn returns True.


TdxMasterViewColumn.OnAfterCalcSummary
OnAfterCalcSummary Event

TdxMasterViewColumn          See Also

Occurs when the ExpressMasterView has completed summary calculations.

type

  TdxMVSummaryEvent = procedure(Sender: TdxMasterViewColumn; Node: TdxMasterViewNode; DataSet: TDataSet; var Value: Extended) of object;

property OnAfterCalcSummary: TdxMVSummaryEvent;

Description

Write an OnAfterCalcSummary event handler to perform specific actions when the footer summary value has just been calculated.  The Sender parameter specifies the column for which a summary was calculated.  The Node parameter determines the TdxMasterViewNode to which a summary is applied.  The DataSet parameter specifies the dataset from which to obtain data.  The Value parameter determines the final value which is displayed in the footer summary.  You can check this value and perform specific actions depending on its contents.


TdxMasterViewColumn.OnBeforeCalcSummary
OnBeforeCalcSummary Event

TdxMasterViewColumn          See Also

Occurs before calculating a summary value.

type

  TdxMVSummaryEvent = procedure(Sender: TdxMasterViewColumn; Node: TdxMasterViewNode; DataSet: TDataSet; var Value: Extended) of object;

property OnBeforeCalcSummary: TdxMVSummaryEvent;

Description

Write an OnBeforeCalcSummary event handler to perform specific actions before calculating a summary value.  The Sender parameter specifies the column for which a summary will be calculated.  The Node parameter determines the TdxMasterViewNode to which this summary is applied.  The DataSet parameter specifies the dataset from which to obtain data.  The Value parameter determines the initial value for calculations.  If the calculation of a summary consumes excessive volumes of time, the OnBeforeCalcSummary event handler can display a message that states that a summary is being calculated.  When calculation is complete, close the window via the OnAfterCalcSummary event handler.


TdxMasterViewColumn.OnCalcSummary
OnCalcSummary Event

TdxMasterViewColumn          See Also

Occurs when the ExpressMasterView performs summary calculations.

type

  TdxMVSummaryEvent = procedure(Sender: TdxMasterViewColumn; Node: TdxMasterViewNode; DataSet: TDataSet; var Value: Extended) of object;

property OnCalcSummary: TdxMVSummaryEvent;

Description

Write an OnCalcSummary event handler to perform specific actions when calculating a summary.  The Sender parameter specifies the column for which this summary is calculated.  The Node parameter determines the TdxMasterViewNode.  The DataSet parameter specifies the dataset from which to obtain data.  The Value parameter determines the current value of a summary before the calculation of the current node.


TdxMasterViewColumn.OnGetContentStyle
OnGetContentStyle Event

TdxMasterViewColumn          See Also

Occurs when repainting a cell that contains data on screen.

type

  TdxMVColumnGetStyleEvent = Procedure(Sender: TdxMasterViewColumn; Node: TdxMasterViewNode; var NewStyle: TdxMasterViewStyle) of object;

property OnGetContentStyle: TdxMVColumnGetStyleEvent;

Description

Write an OnGetContentStyle event handler to specify a new style for the repainted cell.  The Sender parameter specifies the column to which this cell belongs.  The Node parameter specifies the node to which the cell belongs.  The NewStyle parameter specifies a new MasterView style for the cell.


TdxMasterViewColumn.OnGetFooterStyle
OnGetFooterStyle Event

TdxMasterViewColumn          See Also

Occurs when repainting a footer on screen.

type

 TdxMVColumnGetStyleEvent = Procedure(Sender: TdxMasterViewColumn; Node: TdxMasterViewNode; var NewStyle: TdxMasterViewStyle) of object;

property OnGetFooterStyle: TdxMVColumnGetStyleEvent;

Description

Write an OnGetFooterStyle event handler to specify a new style for the repainted footer summary.  The Sender parameter specifies the column to which the footer belongs.  The Node parameter determines the node to which the summary footer is applied.  The NewStyle parameter specifies a new MasterView style for the summary footer.


TdxMasterViewColumn.OnGetHeaderStyle
OnGetHeaderStyle Event

TdxMasterViewColumn          See Also

Occurs when repainting a column header on screen.

type

  TdxMVColumnGetStyleEvent = procedure(Sender: TdxMasterViewColumn; Node: TdxMasterViewNode; var NewStyle: TdxMasterViewStyle) of object;

property OnGetHeaderStyle: TdxMVColumnGetStyleEvent;

Description

Write an OnGetHeaderStyle event handler to specify a new style for the repainted column header.  The Sender parameter specifies the column to which the header belongs.  The Node parameter determines the node to which the header belongs.  The NewStyle parameter specifies a new MasterView style for the column header.


TdxMasterViewLayout
TdxMasterViewLayout Object

Hierarchy

Provides column layout.

Unit

dxMasterView

Declaration

TdxMasterViewLayout = class(TObject);

Description

The TdxMasterViewLayout object is designed for internal use and provides execution of different operations against columns.


Hierarchy

TObject

     |


TdxMasterViewLevel
TdxMasterViewLevel Object

Hierarchy          Properties          Methods         Events

The TdxMasterViewLevel object represents a single level in a TdxMasterView object.

Unit

dxMasterView

Declaration

TdxMasterViewLevel = class(TComponent);

Description

The TdxMasterViewLevel class defines a specific level from which to obtain data.  This level can be master or detail.  Each level includes its own properties, methods, and events which can be used to completely manage the ExpressMasterView's behavior and runtime display characteristics.


Hierarchy

TComponent

     |


TdxMasterViewLevel Properties

TdxMasterViewLevel          Legend

In TdxMasterViewLevel

AbsoluteIndex

Caption

CaptionStyle

ColumnCount

Columns

ContentStyle

Control

Count

DataSet

DataSource

DeleteConfirmCaptionText

DeleteConfirmText

DetailKey

DetailKeyFieldCount

DetailKeyFields

FooterStyle

GridLinesColor

GroupByBoxStyle

GroupColumnCount

GroupColumns

GroupStyle

HasChildren

HeaderStyle

ID

IDFieldCount

IDFields

Index

IsFirst

IsLast

IsTop

Items

Layout

LevelSeparatorColor

LevelSeparatorWidth

MasterKey

MasterKeyFieldCount

MasterKeyFields

MultipleDeleteConfirmText

OptionsBehavior

OptionsCustomize

OptionsCustomizeBox

OptionsDB

OptionsHeader

OptionsView

Parent

PreviewField

PreviewFieldName

PreviewLeftIndent

PreviewLineCount

PreviewMaxLength

PreviewMaxLineCount

PreviewRightIndent

PreviewStyle

RowSeparatorColor

RowSeparatorWidth

SortedColumnCount

SortedColumns

ViewMode

Visible

VisibleColumnCount

VisibleColumns


TdxMasterViewLevel Methods

TdxMasterViewLevel          Legend

In TdxMasterViewLevel

Add

Assign

BeginAssignWidths

BeginDataChanging

BeginLayout

BeginSorting

CancelAssignWidths

CancelDataChanging

CancelLayout

CancelSorting

Clear

ClearSorting

ColumnByFieldName

ColumnByName

Create

CreateAllColumns

CreateColumn

Destroy

DestroyColumns

EndAssignWidths

EndDataChanging

EndLayout

EndSorting

GetContentParams

GetFooterParams

GetGroupByBoxParams

GetHeaderParams

GetParentComponent

GetPreviewParams

HasParent


TdxMasterViewLevel Events

TdxMasterViewLevel          Legend

In TdxMasterViewLevel

OnChangeGrouping

OnCollapsed

OnCollapsing

OnColumnSorted

OnColumnSorting

OnDeleteNode

OnExpanded

OnExpanding

OnGetCaptionStyle

OnGetContentStyle

OnGetFooterCellText

OnGetFooterStyle

OnGetGroupByBoxStyle

OnGetGroupStyle

OnGetHeaderStyle

OnGetPreviewLineCount

OnGetPreviewStyle

OnGetPreviewText

OnHideColumn

OnShowColumn

OnWidthChanged


TdxMasterViewLevel.AbsoluteIndex

TdxMasterViewLevel          See Also

Indicates the absolute index of a TdxMasterViewLevel object.

property AbsoluteIndex : Integer;

Description

Use the AbsoluteIndex to determine the absolute position of a level in the list of MasterView levels.  The first MasterView level has an index of 0 and subsequent levels are numbered sequentially.  If a MasterView level has children, its AbsoluteIndex property value is one less than the index of its first child.

ReadOnly Property


TdxMasterViewLevel.Caption

TdxMasterViewLevel          See Also

Determines the caption for a MasterView level.

property Caption : string;

Description

Specifies the text that appears at the top of a level.

To display the caption for a level, activate the lovCaption option of the OptionsView property of the TdxMasterViewLevel at runtime.  At design-time, activate the customization form, select the appropriate level and check the Caption checkbox on the Options panel.


TdxMasterViewLevel.CaptionStyle

TdxMasterViewLevel          See Also

Determines the style of a level caption.

property CaptionStyle : TdxMasterViewStyle;

Description

The Level caption uses this style to display its contents and background on screen.


TdxMasterViewLevel.ColumnCount

TdxMasterViewLevel           See Also

Returns the number of columns in a level.

property ColumnCount: Integer;

Description

Use the ColumnCount property to obtain the total number of MasterView columns defined for a given level.

ReadOnly Property


TdxMasterViewLevel.Columns

TdxMasterViewLevel           See Also

Contains an array of MasterView columns.

property Columns[Index: Integer] : TdxMasterViewColumn;

Description

Represents an array of MasterView columns.  Use the Columns property to access a column of a specific level.  The Index parameter determines the column index in the list of columns which belong to the level.  The index of the first column in the array is 0.  The number of columns in the TdxMasterViewLevel object is determined by the ColumnCount property.  At design time, a user can access all columns of a level via the Columns list in the Designer window.


TdxMasterViewLevel.ContentStyle

TdxMasterViewLevel          See Also

Determines the style of content cells of a node.

property ContentStyle : TdxMasterViewStyle;

Description

Node cells that contain record values use this style to display their contents and background on screen.


TdxMasterViewLevel.Control

TdxMasterViewLevel          Example

Returns the parent control.

property Control : TdxMasterView;

Description

This property is designed for internal use and returns a parent TdxMasterView instance.


TdxMasterViewLevel.Count

TdxMasterViewLevel          See Also

Indicates the number of child levels.

property Count : Integer;

Description

Use the Count property to determine how many child levels belong to a specific TdxMasterViewLevel.  This property only includes direct children.

ReadOnly Property


TdxMasterViewLevel.DataSet

TdxMasterViewLevel          See Also

Determines the dataset from which data is retrieved for a specific level.

property DataSet : TDataSet;

Description

Use the DataSet property to obtain the dataset that contains data and whose records are displayed as nodes within a specific level.  Each level can have its own dataset.

ReadOnly Property


TdxMasterViewLevel.DataSource

TdxMasterViewLevel          See Also

Determines the datasource from which a MasterView level retrieves its data.

property DataSource : TDataSource;

Description

Set the DataSource property to a valid TDataSource object in order to fetch data for a MasterView level.  This property allows the MasterView control to read from and navigate within a dataset, while maintaining record concurrency with other data-aware objects using the same data source.  Each level can have its own datasource.


TdxMasterViewLevel.DeleteConfirmCaptionText

TdxMasterViewLevel          See Also

Specifies the title that appears in the confirmation dialog box.

property DeleteConfirmCaptionText : string;

Description

Use the DeleteConfirmCaptionText property to specify the title of the confirmation dialog box.  This dialog appears when a user deletes a record or several selected records from the ExpressMasterView via the Ctrl-Del keys or using the DeleteSelection method of the TdxMasterView object and the lodConfirmDelete option of the OptionsDB property of the TdxMasterViewLevel object is active.  Node deletion is possible if the lodAllowDelete option of the OptionsDB property of the TdxMasterViewLevel object is active.

The default value for this property is ‘Confirm’.


TdxMasterViewLevel.DeleteConfirmText

TdxMasterViewLevel          See Also

Determines the string that appears in the confirmation dialog box.

property DeleteConfirmText : string;

Description

Use the DeleteConfirmText property to determine the text that appears in the confirmation dialog box.  This dialog appears when a user deletes a record from the ExpressMasterView via the Ctrl-Del keys or using the DeleteSelection method of the TdxMasterView object and the lodConfirmDelete option of the OptionsDB property of the TdxMasterViewLevel object is active.  Node deletion is possible if the lodAllowDelete option of the OptionsDB property of the TdxMasterViewLevel object is active.

The default value for this property is ‘Delete record from %s?’.  The %s specifier indicates that the level caption will be displayed.


TdxMasterViewLevel.DetailKey

TdxMasterViewLevel          See Also

Specifies one or more field names in a detail dataset to link with the corresponding fields in a master dataset to establish a master-detail relationship between levels.

property DetailKey : string;

Description

Every data node in a MasterView control corresponds to a dataset record.  Master-detail relationships are established via Key values (MasterKey at the parent level, DetailKey at the child level).  Use the DetailKey property to specify the names of one or more fields to use when establishing a detail-master relationship between a specifc level and the parent level.  The DetailKey property is a string that contains one or more field names of the detail dataset.  Remember to separate field names by a semicolon.


TdxMasterViewLevel.DetailKeyFieldCount

TdxMasterViewLevel          See Also

Specifies the number of fields used for the DetailKey.

property DetailKeyFieldCount : Integer;

Description

Because the DetailKey property can contain several field names separated by a semicolon, use the DetailKeyFieldCount property to obtain the number of elements in the DetailKeyFields array.  This number is always one greater than the index of the last element in this array.

ReadOnly Property


TdxMasterViewLevel.DetailKeyFields

TdxMasterViewLevel          See Also

Represents an array of detail key fields associated with a specific level.

property DetailKeyFields[Index: Integer] : TField;

Description

Every data node in a MasterView control corresponds to a dataset record.  Master-detail relationships are established via Key values (MasterKey at the parent level, DetailKey at the child level).   Use the DetailKeyFields property to access a specific detail key field.  The index of the first element in the array is 0.  The total number of elements is determined by the DetailKeyFieldCount property.

ReadOnly Property


TdxMasterViewLevel.FooterStyle

TdxMasterViewLevel          See Also

Determines the style of a node summary footer.

property FooterStyle : TdxMasterViewStyle;

Description

The summary footer uses this style to display its contents and background on screen.

Style	Example
Footer with a style
Footer without any style


TdxMasterViewLevel.GridLinesColor

TdxMasterViewLevel

Specifies grid line color.

property GridLinesColor : TColor;

Description

If the lovGrid or an option of the OptionsView property is set to True, grid lines are drawn.  The GridLinesColor property specifies the color of these grid lines.  The default value for the GridLinesColor is clBtnShadow.


TdxMasterViewLevel.GroupByBoxStyle

TdxMasterViewLevel          See Also

Specifies the style of a group panel.

property GroupByBoxStyle : TdxMasterViewStyle;

Description

The Group panel region uses this style to display its contents and background on screen.

Style	Example
GroupByBox with a style
GroupByBox without any style


TdxMasterViewLevel.GroupColumnCount

TdxMasterViewLevel          See Also

Returns the number of grouped columns.

property GroupColumnCount : Integer;

Description

Use the GroupColumnCount property to obtain the number of grouped columns.  This value is one greater than the index of the last element of the grouped columns array (the GroupColumns property).


TdxMasterViewLevel.GroupColumns

TdxMasterViewLevel          See Also

Represents a list of grouped columns.

property GroupColumns[Index: Integer] : TdxMasterViewColumn;

Description

This property represents an array of grouped columns.  The first element of this array determines a grouped column at the topmost level that groups all nodes at a specific level.  The second element groups the children of a parent node, etc.  The first element in the array has an index of 0.  The total number of grouped columns is specified by the GroupColumnCount property.

To add/remove a column to/from the grouped columns list, use the GroupIndex property or drag column headers to/from the group panel.  Set the GroupIndex property to –1 in order to remove columns from the grouped columns list.  Set the GroupIndex property to zero or any positive value to add a column to the grouped columns list.

ReadOnly Property


TdxMasterViewLevel.GroupStyle

TdxMasterViewLevel          See Also

Determines the style of a grouped node area.

property FooterStyle : TdxMasterViewStyle;

Description

This style is used to display the caption and background of a grouped node on screen.

Style	Example
Group area with a style
Group area without a style


TdxMasterViewLevel.HasChildren

TdxMasterViewLevel

Specifies whether the TdxMasterViewLevel object has children.

property HasChildren : Boolean;

Description

The HasChildren property is True if a level includes sublevels with established master-detail relationships; Otherwise False.  If this property is True a plus (+) button appears to the left of a level node when it is collapsed, and a minus (-) button appears when a node is expanded.

ReadOnly Property


TdxMasterViewLevel.HeaderStyle

TdxMasterViewLevel          See Also

Determines the style of column headers.

property FooterStyle : TdxMasterViewStyle;

Description

Column headers use this style to display their captions and background on screen.

Style	Example
Column header with a style
Column header without a style


TdxMasterViewLevel.ID

TdxMasterViewLevel          See Also

Specifies one or more field names of the dataset that represents a unique value for a data node.

property ID : string;

Description

Every data node in a MasterView control corresponds to a dataset record.  Use the ID property to specify a unique value that identifies every data node. The ID property is a string that contains one or more field names of a dataset separated by a semicolon.  Field name order is significant for this property.


TdxMasterViewLevel.IDFieldCount

TdxMasterViewLevel          See Also

Indicates the number of fields that contain a unique value for a node.

property IDFieldCount : Integer;

Description

Use the IndexFieldCount property to determine the number of elements in the array specified by the IDFields property.

ReadOnly Property


TdxMasterViewLevel.IDFields

TdxMasterViewLevel          See Also

Determines the fields that contain a unique value for a node.

property IDFields[Index: Integer] : TField;

Description

Use the IDFields property to access a specific field used for a unique value via the Index parameter.  This property represents a zero-based array of field objects.

Note:	Do not use the IDFields property directly.  It is best to use the ID property to create a unique value for every data node.


TdxMasterViewLevel.Index

TdxMasterViewLevel

Specifies the position of a TdxMasterViewLevel object in the list of detail levels maintained by its master level.

property Index : Integer;

Description

The Index property determines the position of a specific TdxMasterViewLevel object in the Items array of its master level.  If the Index property is 0, this level is the first child of its master level.

ReadOnly Property


TdxMasterViewLevel.IsFirst

TdxMasterViewLevel          See Also

Indicates whether a node is the first detail level of a specific master level in the ExpressMasterView.

property IsFirst : Boolean;

Description

Use the IsFirst property to ascertain whether a level is placed as the first child level.

ReadOnly Property


TdxMasterViewLevel.IsLast

TdxMasterViewLevel          See Also

Indicates whether a node is the last detail level of a specific master level in the ExpressMasterView.

property IsLast : Boolean;

Description

Use the IsLast property to ascertain whether a level is placed as the last child level.

ReadOnly Property


TdxMasterViewLevel.IsTop

TdxMasterViewLevel          See Also

Indicates whether a node is the topmost level of the ExpressMasterView.

property IsTop : Boolean;

Description

Use the IsTop property to ascertain whether a level is the first direct descendant of the Root level.

ReadOnly Property


TdxMasterViewLevel.Items

TdxMasterViewLevel          See Also

Contains an array of child levels.

property Items[Index: Integer] : TdxMasterViewLevel;

Description

Use the Items property to access a specific child of a specific level.  The Index parameter determines the index of a child level among all child levels.  The index of the first child level is 0.  The total number of TdxMasterViewLevel child objects is returned by the Count property.

ReadOnly Property


TdxMasterViewLevel.Layout

TdxMasterViewLevel

Returns a MasterView layout.

property Layout : TdxMasterViewLayout;

Description

The Layout property is used internally to access the layout object responsible for all column operations at a specified level.


TdxMasterViewLevel.LevelSeparatorColor

TdxMasterViewLevel          See Also

Determines the color of separator lines between a master level and its detail levels.

property LevelSeparatorColor: TColor;

Description

Use the LevelSeparatorColor property to set or access the color for horizontal and vertical separator lines between the parent and child levels of a MasterView control.  The default value for this property is clWindowText.


TdxMasterViewLevel.LevelSeparatorWidth

TdxMasterViewLevel          See Also

Determines the width of separator lines between a master level and its detail levels.

property LevelSeparatorWidth: Integer;

Description

Use the LevelSeparatorWidth property to set or access the width for horizontal and vertical separator lines between the parent and child levels of a MasterView control.  The default value for this property is 0 (no separator lines).


TdxMasterViewLevel.MasterKey

TdxMasterViewLevel          See Also

Specifies one or more field names in a master dataset to link with corresponding fields in a detail dataset in order to establish a master-detail relationship between these levels.

property MasterKey : string;

Description

Every data node in a MasterView control corresponds to a dataset record.  Master-detail relationships are established via Key values (MasterKey at the parent level, DetailKey at the child level).  Use the MasterKey property to specify the names of one or more fields to use when establishing a master-detail relationship between this level and one of its detail levels.  The MasterKey property is a string that contains one or more field names of the master dataset separated by semicolons.


TdxMasterViewLevel.MasterKeyFieldCount

TdxMasterViewLevel          See Also

Specifies the number of fields used for a master level key.

property MasterKeyFieldCount : Integer;

Description

This property specifies the number of elements in the MasterKeyFields array.  This number is always one greater than the index of the last element in this array.

ReadOnly Property


TdxMasterViewLevel.MasterKeyFields

TdxMasterViewLevel          See Also

Represents an array of master key fields associated with a specific master level.

property MasterKeyFields[Index: Integer] : TField;

Description

Every data node in a MasterView control corresponds to a dataset record.  Master-detail relationships are established via Key values (MasterKey at the parent level, DetailKey at the child level).   Use the MasterKeyFields property to access a specific master key field.  The index of the first element in the array is 0.  The total number of elements is determined by the MasterKeyFieldCount property.

ReadOnly Property


TdxMasterViewLevel.MultipleDeleteConfirmText

TdxMasterViewLevel          See Also

Specifies the string that appeares in the confirmation dialog box.

property MultipleDeleteConfirmText : string;

Description

Use the DeleteConfirmText property to specify text in the confirmation dialog box.  This dialog appears when a user deletes several selected records from the ExpressMasterView via the Ctrl-Del keys or using the DeleteSelection method of the TdxMasterView object and the lodConfirmDelete option of the OptionsDB property is active.  The default value for this property is ‘Delete all selected records from %s?’.  The %s specifier signifies that the level caption will be displayed.


TdxMasterViewLevel.OptionsBehavior

TdxMasterViewLevel          See Also          Example

Specifies behavioral properties for a specific MasterView level.

type

  TdxMasterViewLevelOptionBehavior = (lobDblClkExpanding);

  TdxMasterViewLevelOptionsBehavior = set of TdxMasterViewLevelOptionBehavior;

property OptionsBehavior : TdxMasterViewLevelOptionsBehavior;

Description

Available values include:

Value	Meaning
lobDblClkExpanding	If active, a node expands (collapses) when double-clicking it.  Otherwise, a node only expands (collapses) when pressing the ‘+’ / ’-‘ buttons to the left of the node or pressing the ‘+’ or ‘-‘ key buttons.

The default value for the OptionsBehavior property is [lobDblClkExpanding].


TdxMasterViewLevel.OptionsCustomize

TdxMasterViewLevel          See Also          Example

Specifies customization properties for a specific MasterView level.

type

  TdxMasterViewLevelOptionCustomize = (locColumnMoving, locColumnHiding, locColumnHorSizing, locColumnVerSizing, locColumnSorting, locColumnGrouping, locHideColumnOnGrouping, locShowColumnOnUngrouping);

  TdxMasterViewLevelOptionsCustomize = set of TdxMasterViewLevelOptionCustomize;

property OptionsCustomize : TdxMasterViewLevelOptionsCustomize;

Description

Available values include:

Value	Meaning
locColumnMoving	When active, allows a user to move a column within a MasterView control.
locColumnHiding	When active, allows a user to change column width.
locColumnHorSizing	When active, allows a user to size columns horizontally.
locColumnVerSizing	When active, allows a user to size columns vertically.
locColumnSorting	When active, allows a user to sort columns.
locColumnGrouping	When active, allows a user to group columns.
locHideColumnOnGrouping	When active, a column remains within the ExpressNasterView after a user has dropped it onto the group panel.
locShowColumnOnUngrouping	When active, a column appears within the ExpressMasterView after a user has dragged it away from the group panel.

The default values for the OptionsCustomize property include: [locColumnMoving, locColumnHorSizing, locColumnVerSizing, locColumnSorting, locColumnGrouping, and locShowColumnOnUngrouping].


TdxMasterViewLevel.OptionsCustomizeBox

TdxMasterViewLevel          See Also          Example

Specifies the options displayed within the customization form of a specific MasterView level at design time.

type

  TdxMasterViewLevelOptionCustomizeBox = (loxCaption, loxColumns, loxFooter, loxGrid, loxGridWithPreview, loxGroupByBox, loxHeader, loxHeaderOptions, loxOccupyRestSpace, loxPreview, loxViewMode);

  TdxMasterViewLevelOptionsCustomizeBox = set of TdxMasterViewLevelOptionCustomizeBox;

property OptionsCustomizeBox : TdxMasterViewLevelOptionsCustomizeBox;

Description

Available values include:

Value	Meaning
loxCaption	If active, a user can enable/disable level caption display.
loxColumns	When active, the column customization page is in the customization form.
loxFooter	When active, a user can enable/disable footer display.
loxGrid	When active, a user can enable/disable grid line display.
loxGridWithPreview	When active, a user can enable/disable node and preview section line display.
loxGroupByBox	When active, a user can enable/disable group panel display.
loxHeader	When active, a user can enable/disable column header display.
loxHeaderOptions	When active, a user can specify the appearance of column headers. (See detailed information in OptionsHeader)
loxOccupyRestSpace	When active, a user can specify whether to display the rest of the space to the right of the last MasterView column.
loxPreview	When active, a user can enable/disable preview section display.
loxViewMode	When active, a user can choose between horizontal or vertical view modes.
The default values for the OptionsCustomizeBox property include: [loxCaption, loxColumns, loxGrid, loxGroupByBox, loxHeader, loxViewMode].

When all options are activated, the customization form has the following view:


TdxMasterViewLevel.OptionsDB

TdxMasterViewLevel          See Also          Example

type

  TdxMasterViewLevelOptionDB = (lodAllowDelete, lodAllowInsert, lodConfirmDelete, lodDeleteOnlyChildless, lodSmartLoad, lodSmartRefresh, lodSmartReload);

  TdxMasterViewLevelOptionsDB = set of TdxMasterViewLevelOptionDB;

property OptionsDB : TdxMasterViewLevelOptionsDB;

Description

Available values include:

Value	Meaning
lodAllowDelete	Determines whether a user can delete a node and the corresponding record by pressing Delete or Ctrl+Delete keys.
lodAllowInsert	Determines whether a user can insert a node and the corresponding record by pressing the Insert key.
lodConfirmDelete	Determines whether the message box that confirms a user’s request to delete a row within the ExpressMasterView after pressing the Delete or Ctrl+Delete keys appears.
lodDeleteOnlyChildless	Determines whether it is possible to delete all nodes or only nodes without children (by a user or using the TdxMasterViewNode.Delete method).
lodSmartLoad	When active, the ExpressMasterView loads records only for expanded nodes.  When this option is active, all '+' buttons are enabled, though there are no child nodes at the moment of display.
lodSmartRefresh	When active, the ExpressMasterView reloads only modified records when a user posts changes to the dataset.
lodSmartReload	When active, the ExpressMasterView control does not read the contents of the dataset every time it groups, calculates summaries, etc. This provides faster data processing.

The default values for the OptionsDB property include: [lodConfirmDelete, lodSmartLoad, lodSmartReload].


TdxMasterViewLevel.OptionsHeader

TdxMasterViewLevel          See Also          Example

Specifies properties of a MasterView level to modify the appearance of column headers.

type

  TdxMasterViewLevelOptionHeader = (lohForFirstNode, lohForFirstVisibleNode, lohAfterExpandedNode);

  TdxMasterViewLevelOptionsHeader = set of TdxMasterViewLevelOptionHeader;

property OptionsHeader : TdxMasterViewLevelOptionsHeader;

Description

Available values include:

Value	Meaning
lohForFirstNode	When active, column headers are displayed for every first child node.
lohForFirstVisibleNode	When active, column headers are displayed for the first node visible on screen.
lohAfterExpandedNode	When active, column headers are displayed for all nodes located after the currently expanded nodes at the same level.

The default values for the OptionsHeader property include: [lohForFirstNode, lohForFirstVisibleNode, lohAfterExpandedNode].


TdxMasterViewLevel.OptionsView

TdxMasterViewLevel          See Also          Example

Specifies display properties of a specific MasterView level.

type

  TdxMasterViewLevelOptionView = (lovCaption, lovFooter, lovGrid, lovGridWithPreview, lovGroupByBox, lovHeader, lovNoButtonsWhenNoChildren, lovOccupyRestSpace, lovPreview);

  TdxMasterViewLevelOptionsView = set of TdxMasterViewLevelOptionView;

property OptionsView : TdxMasterViewLevelOptionsView;

Description

Available values include:

Value	Meaning
lovCaption	When active, level caption is displayed on screen.
lovFooter	When active, the footer is displayed at this level.
lovGrid	When active, all grid lines are displayed at this level.
lovGridWithPreview	When active, lines between different node columns and the preview section are displayed.
lovGroupByBox	When active, the group panel ("group by" box) at this level is displayed.
lovHeader	When active, column headers are displyed for data nodes at this level.
lovNoButtonsWhenNoChildren	When active, a ‘+’ button is not displayed if a node has no children.
lovOccupyRestSpace	When active, the last column(s) occupy the rest of the space to the right of the last MasterView column.
lovPreview	When active, a preview section is displayed.  Specify a field name from which to retrieve the preview data.

The default values for the OptionsView property include: [lovGrid, lovGridWithPreview, lovHeader, lovOccupyRestSpace];


TdxMasterViewLevel.Parent

TdxMasterViewLevel

Specifies the parent level for a TdxMasterViewLevel object.

property Parent : TdxMasterViewLevel;

Description

The parent level contains a given level as a sublevel and establishes master-detail relationships with it.

ReadOnly Property


TdxMasterViewLevel.PreviewField

TdxMasterViewLevel          See Also

Determines the preview field.

property PreviewField : TField;

Description

Use the PreviewField property to specify a dataset field whose value is displayed in the preview section.


TdxMasterViewLevel.PreviewFieldName

TdxMasterViewLevel          See Also

Determines a field name for the preview section.

property PreviewFieldName : string;

Description

Use the PreviewFieldName property to specify the name of a dataset field whose value is displayed in the preview section.  Setting this property to an empty string hides the preview section.


TdxMasterViewLevel.PreviewLeftIndent

TdxMasterViewLevel          See Also

Specifies the left indent before preview section text in pixels.

property PreviewLeftIndent : Integer;

Description

Use the PreviewLeftIndent property to specify the indent before preview text when drawing the preview section.


TdxMasterViewLevel.PreviewLineCount

TdxMasterViewLevel          See Also

Determines the height of the MasterView level preview section.

property PreviewLineCount : Integer;

Description

Use the PreviewLineCount property to specify the number of rows displayed in the preview section.  When the PreviewLineCount is set to 0, preview section height is calculated automatically to display the contents of the appropriate field.

The default value for this property is 0.


TdxMasterViewLevel.PreviewMaxLength

TdxMasterViewLevel          See Also

Specifies the maximum width of the preview section in characters.

property PreviewMaxLength: Integer;

Description

Use the PreviewMaxLength property to decrease the text displayed within the preview section.  If this property value is 0, the preview section contains the entire text of the preview field.


TdxMasterViewLevel.PreviewMaxLineCount

TdxMasterViewLevel          See Also

Determines the maximum height of the MasterView level preview section when calculating it automatically.

property PreviewMaxLineCount : Integer;

Description

When the PreviewLineCount is set to 0, preview section height is calculated automatically to display the contents of the appropriate field.  Use the PreviewMaxLineCount property to specify the maximum number of rows.  When the PreviewMaxLineCount property is set to 0, the number of rows is not limited.  The default value for this property is 3.


TdxMasterViewLevel.PreviewRightIndent

TdxMasterViewLevel          See Also

Specifies the right indent after preview section text in pixels.

property PreviewRightIndent : Integer;

Description

Use the PreviewRightIndent property to specify the indent after preview text when drawing the preview section.


TdxMasterViewLevel.PreviewStyle

TdxMasterViewLevel          See Also

Specifies the style of the MasterView level preview section.

property PreviewStyle : TdxMasterViewStyle;

Description

The preview section of a specific level uses this style to display its text and background on screen.  If the style is not specified, then the preview section applies the content style except for font color.  By default, the font color it set to clBlue.

Style	Example
Preview with a style
Preview without any style


TdxMasterViewLevel.RowSeparatorColor

TdxMasterViewLevel          See Also

Determines the color of separator lines between MasterView nodes.

property RowSeparatorColor: TColor;

Description

Use the RowSeparatorColor property to set or access the color for horizontal separator lines between nodes of a specific level.  The default value for this property is clBtnShadow.


TdxMasterViewLevel.RowSeparatorWidth

TdxMasterViewLevel          See Also

Determines the width of separator lines between a master level and its detail levels.

property LevelSeparatorWidth: Integer;

Description

Use the LevelSeparatorWidth property to set or access the width of horizontal and vertical separator lines between parent and child levels of a MasterView control.  The default value for this property is 0 (no separator lines).


TdxMasterViewLevel.SortedColumnCount

TdxMasterViewLevel          See Also

Returns the total number of sorted columns.

property SortedColumnCount : Integer;

Description

Nodes can be sorted by several columns within a specific level.  Use the SortedColumnCount property to obtain the total number of sorted columns.

ReadOnly Property


TdxMasterViewLevel.SortedColumns

TdxMasterViewLevel          See Also

Represents a list of sorted columns.

property SortedColumns[Index: Integer]: TdxMasterViewColumn;

Description

Nodes can be sorted by several columns within a specific level.  The SortedColumns property contains an indexed zero-based array of sorted columns.  The Index parameter determines the column to access.  The total number of sorted columns is determined by the SortedColumnCount property.

ReadOnly Property


TdxMasterViewLevel.ViewMode

TdxMasterViewLevel          See Also

Determines the manner in which MasterView nodes are displayed.

type

  TdxMasterViewViewMode = (vmHorizontal, vmVertical);

property ViewMode : TdxMasterViewViewMode;

Description

Use the ViewMode property to specify view mode type.  The ExpressMasterView allows you to arrange column headers horizontally or vertically within a node.

Value	Meaning
vmHorizontal
vmVertical

The default value of the ViewMode property is vmHorizontal.


TdxMasterViewLevel.Visible

TdxMasterViewLevel

Determines whether a level is visible.

property Visible : Boolean;

Description

Use the Visible property to determine if a specific level is visible on screen.

ReadOnly Property


TdxMasterViewLevel.VisibleColumnCount

TdxMasterViewLevel          See Also

Returns the number of visible columns within a MasterView control.

property VisibleColumnCount: Integer;

Description

Use the VisibleColumnCount property to obtain the total number of visible columns within the ExpressMasterView.

ReadOnly Property


TdxMasterViewLevel.VisibleColumns

TdxMasterViewLevel          See Also

Represents an indexed array of visible columns in a MasterView control.

property VisibleColumns[Index: Integer]: TdxMasterViewColumn;

Description

Use the VisibleColumns property to access a specific visible column.  The index of the first element in the VisibleColumns array is 0.  The total number of visible columns is determined by the VisibleColumnCount property.


TdxMasterViewLevel.Add

TdxMasterViewLevel          See Also

Inserts a new child level at a specific level.

function Add: TdxMasterViewLevel;

Description

Call the Add method to insert a new child level at the end of the Items array.  The Add method increments the Count property’s value.


TdxMasterViewLevel.Assign

TdxMasterViewLevel

Copies the contents of one TdxMasterViewLevel object to another.

procedure Assign(Source: TPersistent);  override;

Description

Call the Assign method to copy the properties of one level to another level.  The standard form of a call to Assign is:

Destination.Assign(Source);

This forces Destination to copy the contents of Source to itself.


TdxMasterViewLevel.BeginAssignWidths

TdxMasterViewLevel          See Also

procedure BeginAssignWidths;

Description

Calling the BeginAssignWidths method disables control refresh operations when modifying column widths at a specific level.  If the BeginAssignWidths method has been called, any changes are not reflected until calling the EndAssignWidths method.  The BeginAssignWidths and EndAssignWidths methods prevent numerous updates of the MasterView control when manipulating column widths.  Every call of the BeginAssignWidths method increases the internal counter by one.  Every call of the EndAssignWidths method decreases the internal counter by one.

Note: Make certain that you call the EndAssignWidths method after each call of the BeginAssignWidths method.  Use these methods in the same procedure.


TdxMasterViewLevel.BeginDataChanging

TdxMasterViewLevel          See Also

Disables record reloading.

procedure BeginDataChanging;

Description

Calling the BeginDataChanging method disables reloading of dataset records for a specific level.  Use can use this method when grouping MasterView nodes.  If the BeginDataChanging method has been called, any changes are not reflected until calling the EndDataChanging method.  The BeginDataChanging and EndDataChanging methods prevent multiple reading of dataset records when a MasterView control groups its nodes.  Every call of the BeginDataChanging method increases the internal counter by one.  Every call of the EndDataChanging method decreases the internal counter by one.  If the internal counter is greater than zero, results of grouping are not displayed.

Note: Make certain that you call the EndDataChanging method after each call of the BeginDataChanging method.  Use these methods in the same procedure.


TdxMasterViewLevel.BeginLayout

TdxMasterViewLevel          See Also

procedure BeginLayout;

Description

Calling the BeginLayout method disables control refresh operations when modifying column layouts including column widths at a specific level.  If the BeginLayout method has been called, any changes are not reflected until calling the EndLayout method.  The BeginLayout and EndLayout methods prevent numerous updates of the MasterView control when working with column layouts.  Every call of the BeginLayout method increases the internal counter by one.  Every call of the EndLayout method decreases the internal counter by one.

Note: Make certain that you call the EndLayout method after each call of the BeginLayout method.  Use these methods in the same procedure.


TdxMasterViewLevel.BeginSorting

TdxMasterViewLevel          See Also

procedure BeginSorting;

Description

The BeginSorting and EndSorting methods enable the multi-sort feature of the ExpressMasterView.  Assume, you need to sort data within a MasterView level by three columns.  If you change the SortIndex property of the columns one after another, nodes will be re-sorted three times and you won’t obtain the desired result.  In order to create multi-sorted columns, call the BeginSorting method before changing the SortIndex property of the first column, and then change the SortIndex property of every column by which you wish to sort, then finally call the EndSorting method.  The BeginSorting method only ‘freezes’ column sorting and nodes are actually sorted on calling the EndSorting method.  The BeginSorting method also disables record reloading to prevent numerous reloading for each sorted column.  Every call of the BeginSorting method increases the internal counter by one.  Every call of the EndSorting method decreases the internal counter by one.

Note: Make certain that you call the EndSorting method after each call of the BeginSorting method.  Use these methods in the same procedure.


TdxMasterViewLevel.CancelAssignWidths

TdxMasterViewLevel          See Also

Cancels all changes made to column widths.

procedure CancelAssignWidths;

Description

Call the CancelAssignWidths method to null the internal counter of the BeginAssignWidths and EndAssignWidths methods and cancel all column width modifications.  Call this method to enable refresh operations regardless of the internal counter.


TdxMasterViewLevel.CancelDataChanging

TdxMasterViewLevel          See Also

Enables records reloading and MasterView control refresh operations.

procedure CancelDataChanging;

Description

Call the CancelDataChanging method to null the internal counter of the BeginDataChanging and EndDataChanging methods and cancel all changes made to the MasterView structure, for instance, to cancel grouped column modifications.  Call this method to enable record loading regardless of the internal counter.


TdxMasterViewLevel.CancelLayout

TdxMasterViewLevel          See Also

Cancels all changes made to column layouts.

procedure CancelLayout;

Description

Call the CancelLayout method to null the internal counter of the BeginLayout and EndLayout methods and cancel all column layout modifications.  Call this method to enable refresh operations regardless of the internal counter.


TdxMasterViewLevel.CancelSorting

TdxMasterViewLevel          See Also

Enables record reloading and MasterView control refresh operations.

procedure CancelSorting;

Description

Call the CancelSorting method to null the internal counter of the BeginSorting and EndSorting methods and cancel all changes made to the MasterView’s sorting structure.  Call this method to enable record loading regardless of the internal counter.


TdxMasterViewLevel.Clear

TdxMasterViewLevel          See Also

Deletes all child levels.

procedure Clear;

Description

Call the Clear method to empty the Items array and set Count to 0.  Call it to remove all child levels at a specific level.


TdxMasterViewLevel.ClearSorting

TdxMasterViewLevel

Clears the list of sorted columns at a specific level.

procedure ClearSorting(ExceptionalColumn: TdxMasterViewColumn);

Description

Call the ClearSorting method to remove columns from the column-sorting list except for the column specified by the ExceptionalColumn parameter.  This parameter can be omitted.  After calling this method, a MasterView control will not have any sorted columns.


TdxMasterViewLevel.ColumnByFieldName

TdxMasterViewLevel          See Also

Returns a column associated with a specified dataset field.

function ColumnByFieldName(const AFieldName: string): TdxMasterViewColumn;

Description

The columns of a MasterView control are associated with specific dataset fields.  Use the ColumnByFieldName method to obtain a column associated with a specific field.  The AFieldName parameter determines the name of this field.

The following code groups nodes by a column, associated with the ‘Country’ field:

(dxMasterViewLevel1.ColumnByFieldName('Country')).GroupIndex := 0;


TdxMasterViewLevel.ColumnByName

TdxMasterViewLevel          See Also

Returns a column by its name.

function ColumnByName(const AName: string): TdxMasterViewColumn;

Description

Use the ColumnByName method to access a column via its name, specified by the AName parameter.


TdxMasterViewLevel.Create

TdxMasterViewLevel

Creates an instance of type TdxMasterViewLevel.

constructor Create(AOwner: TComponent); override;

Description

Creates and initializes a TdxMasterViewLevel object.  After calling the inherited contstructor, the Create method sets all MasterView level properties to their default values.


TdxMasterViewLevel.CreateAllColumns

TdxMasterViewLevel          See Also

Creates columns for all fields in a dataset.

procedure CreateAllColumns;

Description

The CreateAllColumns method creates columns in the same manner as those created at design-time by pressing the Add... button in the customization form.  Use this method to quickly create columns for all DataSet fields.  All new columns are of simple text type.


TdxMasterViewLevel.CreateColumn

TdxMasterViewLevel          See Also

Creates a specified column type.

type

  TdxMasterViewColumnClass = class of TdxMasterViewColumn;

function CreateColumn(AColumnClass: TdxMasterViewColumnClass): TdxMasterViewColumn;

Description

The CreateColumn method creates a new column type, specified by the AColumnClass parameter, and adds it to the list of MasterView columns (the Columns property) - at a specific level.  The MasterView level is specified as the owner of this column.


TdxMasterViewLevel.Destroy

TdxMasterViewLevel

destructor Destroy;  override;

Description

Destroys an instance of the TdxMasterViewLevel and frees its memory.


TdxMasterViewLevel.DestroyColumns

TdxMasterViewLevel

Destroys MasterView columns.

procedure DestroyColumns;

Description

Destroys all MasterView columns and releases the memory they allocate.  Be careful when using this method to avoid data loss.


TdxMasterViewLevel.EndAssignWidths

TdxMasterViewLevel          See Also

procedure EndAssignWidths;

Description

Calling the EndAssignWidths method enables control refresh operations when modifying column widths at a specific level.  The BeginAssignWidths and EndAssignWidths methods prevent numerous updates of the MasterView control when working with column widths.  Every call of the BeginAssignWidths method increases the internal counter by one.  Every call of the EndAssignWidths method decreases the internal counter by one.

Note: Make certain that you call the EndAssignWidths method after each call of the BeginAssignWidths method.  Use these methods in the same procedure.


TdxMasterViewLevel.EndDataChanging

TdxMasterViewLevel          See Also

Enables record reloading.

procedure EndDataChanging;

Description

Calling the EndDataChanging method enables reloading of dataset records for a specific level and refresh operations for a MasterView control.  Use this method, for instance, when grouping MasterView nodes.  The BeginDataChanging and EndDataChanging methods prevent multiple reading of dataset records when a MasterView control groups its nodes.  Every call of the BeginDataChanging method increases the internal counter by one.  Every call of the EndDataChanging method decreases the internal counter by one.  If the internal counter is greater than zero, grouping results are not displayed.

Note: Make certain that you call the EndDataChanging method after each call of the BeginDataChanging method.  Use these methods in the same procedure.


TdxMasterViewLevel.EndLayout

TdxMasterViewLevel          See Also

procedure EndLayout;

Description

Calling the EndLayout method enables control refresh operations when modifying column layouts including column widths at a specific level and forces a MasterView control to refresh itself.  The BeginLayout and EndLayout methods prevent numerous updates of the MasterView control when working with column layouts.  Every call of the BeginLayout method increases the internal counter by one.  Every call of the EndLayout method decreases the internal counter by one.

Note: Make certain that you call the EndLayout method after each call of the BeginLayout method.  Use these methods in one and the same procedure.


TdxMasterViewLevel.EndSorting

TdxMasterViewLevel          See Also

Enables multiple column sorting.

procedure EndSorting;

Description

The BeginSorting and EndSorting methods enable the multi-sorting capabilities of the ExpressMasterView.  Assume, you need to sort data within a MasterView level by three columns.  If you change the SortIndex property of the columns one after another, nodes will be re-sorted three times and you won’t obtain the desired result.  In order to create multi-sorted columns, call the BeginSorting method before changing the SortIndex property of the first column, and then change the SortIndex property of every column by which you wish to sort, and then call the EndSorting method.  The BeginSorting method only ‘freezes’ column sorting,  but nodes are sorted on calling the EndSorting method.  The EndSorting method also enables record reloading to prevent numerous reloading for each sorted column.  Every call of the BeginSorting method increases the internal counter by one.  Every call of the EndSorting method decreases the internal counter by one.

Note: Make certain that you call the EndSorting method after each call of the BeginSorting method.  Use these methods in the same procedure.


TdxMasterViewLevel.GetContentParams

TdxMasterViewLevel          See Also

Returns drawing parameters of a data cell at a specific level.

type

  PBRUSH = ^HBRUSH;

  PColor = ^TColor;

  PFont = ^TFont;

procedure GetContentParams(Node: TdxMasterViewNode; Column: TdxMasterViewColumn; ABrush: PBRUSH; ATextColor, ABkColor: PColor; AFont: PFont; IsPreview, CheckSelected: Boolean);

Description

The GetContentParams method is used internally to get parameters for a cell which belongs to the node and the column specified by the Node and Column parameters accordingly.  The following parameters are available:

Parameter	Description
ABrush	Determines the Windows brush object HBRUSH for a data cell.
ATextColor	Specifies text color.
ABkColor	Specifies background color.
AFont	Specifies text font.
IsPreview	Specifies whether a cell contains a preview.
CheckSelected	Determines whether a cell is selected.


TdxMasterViewLevel.GetFooterParams

TdxMasterViewLevel          See Also

Returns drawing parameters of a footer at a specific level.

type

  PBRUSH = ^HBRUSH;

  PColor = ^TColor;

  PFont = ^TFont;

procedure GetFooterParams(Node: TdxMasterViewNode; Column: TdxMasterViewColumn; ABrush: PBRUSH; ATextColor, ABkColor: PColor; AFont: PFont);

Description

The GetFooterParams method is used internally to get parameters for a footer cell which belongs to the node and the column specified by the Node and Column parameters accordingly.  The following parameters are available:

Parameter	Description
ABrush	Determines the Windows brush object HBRUSH for a footer.
ATextColor	Specifies text color.
ABkColor	Specifies background color.
AFont	Specifies text font.


TdxMasterViewLevel.GetGroupByBoxParams

TdxMasterViewLevel          See Also

Returns drawing parameters of a group panel at a specific level.

type

  PBRUSH = ^HBRUSH;

  PColor = ^TColor;

  PFont = ^TFont;

procedure GetGroupByBoxParams(Node: TdxMasterViewNode; Column: TdxMasterViewColumn; ABrush: PBRUSH; ATextColor, ABkColor: PColor; AFont: PFont);

Description

The GetGroupByBoxParams method is used internally to get parameters for a group panel.  The following parameters are available:

Parameter	Description
ABrush	Determines the Windows brush object HBRUSH for a group panel.
ATextColor	Specifies text color.
ABkColor	Specifies background color.
AFont	Specifies text font.


TdxMasterViewLevel.GetHeaderParams

TdxMasterViewLevel          See Also

Returns drawing parameters of a column header at a specific level.

type

  PBRUSH = ^HBRUSH;

  PColor = ^TColor;

  PFont = ^TFont;

procedure GetHeaderParams(Node: TdxMasterViewNode; Column: TdxMasterViewColumn; ABrush, ARestSpaceBrush: PBRUSH; ATextColor, ABkColor: PColor; AFont: PFont);

Description

The GetHeaderParams method is used internally to get parameters for a column header which belongs to the node and the column specified by the Node and Column parameters accordingly.  The following parameters are available:

Parameter	Description
ABrush	Determines the Windows brush object HBRUSH for a column header.
ARestSpaceBrush	Determines the Windows brush object HBRUSH for a space to the right of the last column.
ATextColor	Specifies text color.
ABkColor	Specifies background color.
AFont	Specifies text font.


TdxMasterViewLevel.GetParentComponent

TdxMasterViewLevel

Returns the parent component for a specific column.

function GetParentComponent: TComponent; override;

Description

Returns a MasterView control if this level is the first direct descendant of the Root level; Otherwise it returns its parent level.


TdxMasterViewLevel.GetPreviewParams

TdxMasterViewLevel          See Also

Returns drawing parameters of the preview section at a specific level.

type

  PBRUSH = ^HBRUSH;

  PColor = ^TColor;

  PFont = ^TFont;

procedure GetContentParams(Node: TdxMasterViewNode; Column: TdxMasterViewColumn; ABrush: PBRUSH; ATextColor, ABkColor: PColor; AFont: PFont);

Description

The GetContentParams method is used internally to get parameters for the preview section which belongs to the node specified by the Node parameters.  The following parameters are available:

Parameter	Description
ABrush	Determines the Windows brush object HBRUSH for a data cell.
ATextColor	Specifies text color.
ABkColor	Specifies background color.
AFont	Specifies text font.


TdxMasterViewLevel.HasParent

TdxMasterViewLevel

Indicates whether a component has a parent.

function HasParent: Boolean; override;

Description

This method overrides the TComponent HasParent method.  The HasParent property is introduced in the TComponent class for the streaming system that loads and saves components.  If the return value is True, then some other object (a parent) is responsible for writing a level to a stream.  The HasParent method of the TdxMasterViewLevel returns True.


TdxMasterViewLevel.OnChangeGrouping
OnChangeGrouping Event

TdxMasterViewLevel          See Also

Occurs when a column is dragged over a group panel.

type

  TdxMVChangeGroupingEvent = procedure(Sender: TdxMasterViewLevel; Column: TdxMasterViewColumn; GroupIndex: Integer; var Allow: Boolean) of object;

property OnChangeGrouping: TdxMVChangeGroupingEvent;

Description

Write an OnChangeGrouping event handler to perform specific actions when adding a new column to the grouped columns list.  The Sender parameter specifies the MasterView level that contains the newly added column.  The Column parameter specifies a column which is dragged over the group panel.  The GroupIndex parameter determines the index of the dragged column in the list of grouped columns.  The Allow parameter specifies whether grouping is enabled: a column can be added to the list of grouped columns (True); nodes cannot be grouped by this column (False).


TdxMasterViewLevel.OnCollapsed
OnCollapsed Event

TdxMasterViewLevel          See Also

Occurs when a node has just been collapsed.

type

  TdxMVNodeEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode) of object;

property OnCollapsed: TdxMVNodeEvent;

Description

Write an OnCollapsed event handler to perform specific actions after specific nodes have collapsed.  The Sender parameter specifies the MasterView level that contains a node.  The Node parameter determines the collapsed node.  For instance, the following code prevents the collapse of the first node at a specific level:

procedure TForm1.lvlCustomersCollapsed(Sender: TdxMasterViewLevel;  Node: TdxMasterViewNode);

begin

if Node.IsFirstInLevel then

  Node.Expanded := True;

end;


TdxMasterViewLevel.OnCollapsing
OnCollapsing Event

TdxMasterViewLevel          See Also

Occurs before collapsing a node.

type

  TdxMVNodeAllowEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; var Allow: Boolean) of object;

property OnCollapsing: TdxMVNodeAllowEvent;

Description

Write an OnCollapsing event handler to perform specific actions before collapsing a node.  The Sender parameter specifies the MasterView level that contains this node.  The Node parameter specifies the node to collapse.  The Allow parameter determines whether collapsing is available.  Set Allow to False to prevent node collapsing.  The following code disables node collapse operations:

procedure TForm1.lvlCustomersCollapsing(Sender: TdxMasterViewLevel;  Node: TdxMasterViewNode);

begin

  Allow := False;

end;


TdxMasterViewLevel.OnColumnSorted
OnColumnSorted Event

TdxMasterViewLevel          See Also

Occurs after nodes have been sorted.

type

  TdxMVColumnEvent = procedure(Sender: TdxMasterViewLevel; Column: TdxMasterViewColumn) of object;

property OnColumnSorted: TdxMVColumnEvent;

Description

Write an OnColumnSorted event handler to perform specific actions after sorting nodes by a column specified by the Column parameter.  The Sender parameter specifies the MasterView level that contains the sorted column.


TdxMasterViewLevel.OnColumnSorting
OnColumnSorting Event

TdxMasterViewLevel          See Also

Occurs before sorting nodes.

type

  TdxMVColumnAllowEvent = Procedure(Sender: TdxMasterViewLevel; Column: TdxMasterViewColumn; var Allow: Boolean) of object;

property OnColumnSorted: TdxMVColumnEvent;

Description

Write an OnColumnSorting event handler to specify whether nodes can be sorted by the column specified by the Column parameter.  The Sender parameter specifies the MasterView level that contains the sorted column.  Set the Allow parameter to False within the event handler to prevent sorting by a column or to True to enable sorting.  For instance, the following code prevents sorting by the 'Country' column:

procedure TForm1.lvlCustomersColumnSorting(Sender : TdxMasterViewLevel; Column : TdxMasterViewColumn; var Allow : Boolean);

begin

  if Column.Caption = 'Country' then

    Allow := False;

end;


TdxMasterViewLevel.OnDeleteNode
OnDeleteNode Event

TdxMasterViewLevel          See Also

Occurs before deleting a node.

type

  TdxMVNodeEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode) of object;

property OnDeleteNode: TdxMVNodeEvent;

Description

Write an OnDeleteNode event handler to perform specific actions when deleting a node.  The Sender parameter specifies the MasterView level that contains the node.  The Node parameter determines the node to delete.


TdxMasterViewLevel.OnExpanded
OnExpanded Event

TdxMasterViewLevel          See Also

Occurs after expanding a node.

type

  TdxMVNodeEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode) of object;

property OnExpanded: TdxMVNodeEvent;

Description

Write an OnExpanded event handler when expanding a node within a MasterView control.  The Sender parameter specifies the MasterView level which contains this node.  The Node parameter specifies the expanded node.


TdxMasterViewLevel.OnExpanding
OnExpanding Event

TdxMasterViewLevel          See Also          Example

Occurs before expanding a node.

type

  TdxMVNodeAllowEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; var Allow: Boolean) of object;

property OnCollapsing: TdxMVNodeAllowEvent;

Description

Occurs when a node, specified by the Node parameter, is about to be expanded.  The Sender parameter specifies the MasterView level which contains this node.  The Allow parameter determines whether expanding a node is enabled: a node can be expanded (True); node expansion is disabled (False).  The following code disables expansion of the first node at a specific level:

procedure TForm1.lvlCustomersExpanding(Sender: TdxMasterViewLevel;  Node: TdxMasterViewNode);

begin

  if Node.IsFirstInLevel then

Allow := False;

  end;


TdxMasterViewLevel.OnFilterRecord
OnFilterRecord Event

TdxMasterViewLevel          Example

Occurs when loading records from a dataset.

type

  TdxMVFilterRecordEvent = procedure(Sender: TdxMasterViewLevel; const AID, AKeyValue: Variant; var Accept: Boolean) of object;

property OnFilterRecord: TdxMVFilterRecordEvent;

Description

Write an OnFilterRecord event handler to specify a filter for record loading.  The Sender parameter specifies the MasterView level to which a loaded record belongs.  The AID and AKeyValue parameters determine the ID field and key value of this record accordingly.  Set the Accept parameter to False within the OnFilterRecord event handler to reject the record or to True to load it.


TdxMasterViewLevel.OnGetCaptionStyle
OnGetCaptionStyle Event

TdxMasterViewLevel          See Also

Occurs when drawing a MasterView level caption.

type

  TdxMVLevelGetStyleEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; Column: TdxMasterViewColumn; var NewStyle: TdxMasterViewStyle) of object;

property OnGetCaptionStyle: TdxMVLevelGetStyleEvent;

Description

Write an OnGetCaptionStyle event handler to specify a different style for a level caption.  The Sender parameter specifies the MasterView level whose caption is drawn.  The Node and Column parameters are not used in this event.  The NewStyle parameter specifies which style to apply to the caption contents and background.


TdxMasterViewLevel.OnGetContentStyle
OnGetContentStyle Event

TdxMasterViewLevel          See Also

Occurs when drawing a cell on screen.

type

  TdxMVLevelGetStyleEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; Column: TdxMasterViewColumn; var NewStyle: TdxMasterViewStyle) of object;

property OnGetContentStyle: TdxMVLevelGetStyleEvent;

Description

Write an OnGetContentStyle event handler to specify a different style for a level caption.  The Sender parameter specifies the MasterView level to which a specific cell belongs.  The Node and Column parameters determine the node and the column to which the cell belongs.  The NewStyle parameter specifies which style to apply to the cell contents and background.


TdxMasterViewLevel.OnGetFooterCellText
OnGetFooterCellText Event

TdxMasterViewLevel

Occurs when drawing MasterView footer cells.

type

  TdxMVGetFooterCellTextEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; Column: TdxMasterViewColumn; var Text: string) of object;

property OnGetFooterCellText: TdxMVGetFooterCellTextEvent;

Description

Use the OnGetFooterCellText event to specify the text drawn within a footer cell (set the Text parameter to the desired text within the OnGetFooterCellText event handler).  The Sender parameter specifies the MasterView level at which this footer is drawn.  The Node parameter determines the node to which this footer cell is applied.  The Column parameter identifies the column within which the cell is drawn.  The OnGetFooterCellText event is generated if the lovFooter option of the OptionsView property of the TdxMasterViewLevel object is set to True.


TdxMasterViewLevel.OnGetFooterStyle
OnGetFooterStyle Event

TdxMasterViewLevel          See Also

Occurs when repainting a MasterView footer on screen.

type

  TdxMVLevelGetStyleEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; Column: TdxMasterViewColumn; var NewStyle: TdxMasterViewStyle) of object;

property OnGetFooterStyle: TdxMVLevelGetStyleEvent;

Description

Write an OnGetFooterStyle event handler to specify a new style for the repainted footer summary.  The Sender parameter specifies the MasterView level to which the footer belongs.  The Node parameter determines the node to which the summary footer is applied.  The Column parameter identifies the column within which a footer cell is drawn.  The NewStyle parameter specifies a new MasterView style for the summary footer.


TdxMasterViewLevel.OnGetGroupByBoxStyle
OnGetGroupByBoxStyle Event

TdxMasterViewLevel          See Also

Occurs when drawing a MasterView group panel.

type

  TdxMVLevelGetStyleEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; Column: TdxMasterViewColumn; var NewStyle: TdxMasterViewStyle) of object;

property OnGetGroupByBoxStyle: TdxMVLevelGetStyleEvent;

Description

Write an OnGetGroupByBoxStyle event handler to specify a different style for a group panel.  The Sender parameter specifies the MasterView level to which this group panel is applied.  The Node and Column parameters are not used in this event.  The NewStyle parameter specifies which style to apply to the contents and background of the group panel.


TdxMasterViewLevel.OnGetGroupStyle
OnGetGroupStyle Event

TdxMasterViewLevel          See Also          Example

Occurs when drawing a group MasterView node.

type

  TdxMVLevelGetStyleEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; Column: TdxMasterViewColumn; var NewStyle: TdxMasterViewStyle) of object;

property OnGetGroupStyle: TdxMVLevelGetStyleEvent;

Description

Write an OnGetGroupStyle event handler to specify a different style for a grouped node.  The Sender parameter specifies the MasterView level to which this grouped node belongs.  The Node parameter determines the grouped node.  The Column parameter is not used in this event.  The NewStyle parameter specifies which style to apply to the contents and background of the grouped node.


TdxMasterViewLevel.OnGetHeaderStyle
OnGetHeaderStyle Event

TdxMasterViewLevel          See Also

Occurs when repainting a column header on screen.

type

  TdxMVLevelGetStyleEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; Column: TdxMasterViewColumn; var NewStyle: TdxMasterViewStyle) of object;

property OnGetHeaderStyle: TdxMVLevelGetStyleEvent;

Description

Write an OnGetHeaderStyle event handler to specify a new style for the repainted column header.  The Sender parameter specifies the MasterView level to which the column header belongs.  The Node parameter determines the node to which the column header belongs.  The Column parameter specifies the column whose header is drawn.  The NewStyle parameter specifies a new MasterView style for the column header.


TdxMasterViewLevel.OnGetPreviewLineCount
OnGetPreviewLineCount Event

TdxMasterViewLevel

Occurs when drawing the preview section.

type

  TdxMVGetPreviewLineCountEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; var LineCount: Integer) of object;

property OnGetPreviewLineCount: TdxMVGetPreviewLineCountEvent;

Description

Write an OnGetPreviewLineCount event handler to specify the number of lines in the preview section of a node.  The Sender parameter specifies the MasterView level to which a specific node belongs.  The Node parameter specifies the node for which the preview section is drawn.  Set the LineCount parameter to manually determine the number of lines in the preview section.


TdxMasterViewLevel.OnGetPreviewStyle
OnGetPreviewStyle Event

TdxMasterViewLevel          See Also

Occurs when drawing the preview section for a MasterView node.

type

  TdxMVLevelGetStyleEvent = procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; Column: TdxMasterViewColumn; var NewStyle: TdxMasterViewStyle) of object;

property OnGetPreviewStyle: TdxMVLevelGetStyleEvent;

Description

Write an OnGetPreviewStyle event handler to specify a different style for the preview section of a node specified by the Node parameter.  The Sender parameter specifies the MasterView level to which this node belongs.  The Column parameter is not used in this event.  The NewStyle parameter specifies which style to apply to the contents and background of the preview section.


TdxMasterViewLevel.OnGetPreviewText
OnGetPreviewText Event

TdxMasterViewLevel          See Also

Occurs when drawing preview section text.

type

  TdxMVGetPreviewTextEvent = Procedure(Sender: TdxMasterViewLevel; Node: TdxMasterViewNode; var Text: string) of object;

property OnGetPreviewText: TdxMVGetPreviewTextEvent;

Description

Write an OnGetPreviewText event handler to customize preview section text.  The Sender parameter specifies the MasterView level to which a specific node belongs.  The Node parameter determines the node for which the preview section is drawn.  Use the Text parameter to specify preview section text.

The following code demonstrates how to display text across two lines within the preview section:

// Delphi

procedure TForm1.lvlCustomersGetPreviewText(Sender: TdxMasterViewLevel; Node: TdxMasterView; var Text: String);

begin

  Text := 'Country : ' + Node.Values[lvlCustomersCountry.Index] +

    #10 + 'State : ' + Node.Values[lvlCustomersState.Index];

end;

// C++Builder

void __fastcall TForm1:: lvlCustomersGetPreviewText(TObject *TdxMasterViewLevel, TdxMasterViewNode *Node, AnsiString &Text)

{

  Text = "Country : " + Node->Values[lvlCustomersCountry->Index] +

    "\n" + "State : " + Node->Values[lvlCustomersState->Index];

}


TdxMasterViewLevel.OnHideColumn
OnHideColumn Event

TdxMasterViewLevel          See Also

Occurs when moving a column from the ExpressMasterView to the customization form.

type

  TdxMVColumnEvent = procedure(Sender: TdxMasterViewLevel; Column: TdxMasterViewColumn) of object;

property OnHideColumn: TdxMVColumnEvent;

Description

Use the OnHideColumn event handler to perform specific actions when dragging a column specified by the Column parameter to the customization form.  The Sender parameter specifies the MasterView level to which this column belongs.


TdxMasterViewLevel.OnShowColumn
OnShowColumn Event

TdxMasterViewLevel          See Also

Occurs when moving a column from the customization form to the ExpressMasterView.

type

  TdxMVColumnEvent = procedure(Sender: TdxMasterViewLevel; Column: TdxMasterViewColumn) of object;

property OnHideColumn: TdxMVColumnEvent;

Description

Use the OnHideColumn event handler to perform specific actions when draging a column specified by the Column parameter to the MasterView control.  The Sender parameter specifies the MasterView level to which this column belongs.


TdxMasterViewLevel.OnWidthChanged
OnWidthChanged Event

TdxMasterViewLevel

Occurs when changing level width.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnWidthChanged: TNotifyEvent;

Description

The OnWidthChanged event is generated after changing level width.  Write an OnWidthChanged event handler to perform specific actions when changing level width.


TdxMasterViewList
TdxMasterViewList Object

Hierarchy          Properties          Methods

Stores a list of nodes.

Unit

dxMasterView

Declaration

TdxMasterViewList = class(TObject);

Description

The TdxMasterViewList object is used to maintain different lists of TdxMasterViewNode objects, for instance, the list of selected nodes.  This class introduces properties and methods to:

•	Add or delete nodes in the list.

•	Rearrange nodes in the list.

•	Locate and access nodes in the list.

•	Sort nodes in the list.


Hierarchy

TObject

     |


TdxMasterViewList Properties

TdxMasterViewList          Legend

In TdxMasterViewList

Capacity

Count

Items

List

Owner


TdxMasterViewList Methods

TdxMasterViewList          Legend

In TdxMasterViewList

Add

BeginDeletion

BeginInsertion

Clear

CopyTo

Create

Delete

Destroy

EndDeletion

EndInsertion

Error

First

IndexOf

Insert

Last

Move

Remove

Sort


TdxMasterViewList.Capacity

TdxMasterViewList          See Also

Specifies the size of the nodes list maintained by a TdxMasterViewList object.

property Capacity : Integer;

Description

Use the Capacity property to determine the number of nodes a list can contain without reallocating memory.  You should distinguish between the Capacity and Count properties.  The Count property determines the number of nodes that are already in the list.  The value of the Capacity property is always greater than or equal to the value of the Count property.


TdxMasterViewList.Count

TdxMasterViewList          See Also

Indicates the number of nodes in a list.

property Count : Integer;

Description

Use the Count property to determine the number of nodes in the array of the Items property.


TdxMasterViewList.Items

TdxMasterViewList          See Also

Lists node references.

property Items[Index: Integer] : TdxMasterViewNode;

Description

Use the Items property to obtain a MasterView node in the list.  The Index parameter indicates the index of a node, where 0 is the index of the first node in the list, 1 is the index of the second node, etc.  Use the Items property with the Count property to iterate through all objects in the list.


TdxMasterViewList.List

TdxMasterViewList         See Also

Specifies an array of nodes that represents the Items array.

type

  TdxMasterViewNodeList = array[0..MaxListSize - 1] of TdxMasterViewNode;

  PdxMasterViewNodeList = ^TdxMasterViewNodeList;

property List : PdxMasterViewNodeList;

Description

Use the List property to gain direct access to the nodes array specified in the Items property.


TdxMasterViewList.Owner

TdxMasterViewList          See Also

Determines the node that uses a list to manage its child nodes.

property Owner : TdxMasterViewNode;

Description

Use the Owner property to access a node that uses this TdxMasterViewList object to implement its Items property.


TdxMasterViewList.Add

TdxMasterViewList          See Also

Inserts a new node at the end of the list.

function Add(Item: TdxMasterViewNode): Integer;

Description

Call the Add method to insert a new node at the end of the Items array.  This method returns the index of the new item, where the first node in the list has an index of 0.  The Add method increments Count and, if necessary, allocates memory by increasing Capacity value.


TdxMasterViewList.BeginDeletion

TdxMasterViewList          See Also

Disables refresh operations of a TdxMasterViewList object.

procedure BeginDeletion;

Description

When deleting or inserting new nodes, the TdxMasterView object must be locked since the list recalculates all indexes.   Call the BeginDeletion method before deleting an item of the TdxMasterView list.  Every call of this method increases the internal counter by one.  Every call of the EndDeletion method decreases the internal counter by one.  Make certain that you call the EndDeletion method after each call of the BeginDeletion method.  Use these methods in the same procedure.

Note: You cannot use the BeginDeletion and EndDeletion methods together with the BeginInsertion and EndInsertion methods.


TdxMasterViewList.BeginInsertion

TdxMasterViewList          See Also

Locks TdxMasterView list refresh.

procedure BeginInsertion;

Description

When deleting or inserting new nodes, the TdxMasterView object must be locked since the list recalculates all indexes.   Call the BeginInsertion method before inserting an item of the TdxMasterView list.  Every call of this method increases the internal counter by one.  Every call of the EndInsertion method decreases the internal counter by one.  Make certain that you call the EndInsertion method after each call of the BeginInsertion method.  Use these methods in the same procedure.

Note: You cannot use the BeginDeletion and EndDeletion methods together with the BeginInsertion and EndInsertion methods.


TdxMasterViewList.Clear

TdxMasterViewList          See Also

Deletes all nodes from the list.

procedure Clear;

Description

Call the Clear method to empty the Items array and set the Count to 0.  This method frees the memory used to store the Items array and sets Capacity to 0.


TdxMasterViewList.CopyTo

TdxMasterViewList

Copies data of a TdxMasterViewList object to a TList object.

procedure CopyTo(List: TList);

Description

Call the CopyTo method to copy all items and their contents from the TdxMasterView object to a TList object.


TdxMasterViewList.Create

TdxMasterViewList

Creates an instance of type TdxMasterViewList.

type

  TdxMasterViewListMode = (lmItems, lmAbsoluteItems, lmSelectedItems);

constructor Create(AOwner: TdxMasterViewNode; AMode: TdxMasterViewListMode);

Description

Creates and initializes the TdxMasterViewList object.  The AOwner parameter specifies the node, to which the MasterView list belongs.  The AMode parameter specifies which node type is contained in the list. The following values are available:

Value	Meaning
lmItems	The TdxMasterViewList object contains the list of child nodes.
lmAbsoluteItems	The TdxMasterViewList object contains the list of ExpressMasterView nodes.
lmSelectedItems	The TdxMasterViewList object contains the list of selected ExpressMasterView nodes.


TdxMasterViewList.Delete

TdxMasterViewList          See Also

Removes a node from the appropriate list.

procedure Delete(Index: Integer);

Description

Call the Delete method to remove a node, at the position specified by the Index parameter, from the list.  The index is zero-based, so the first node has an Index value of 0, the second node has an Index value of 1, etc.

Note: When calling the Delete method, you should call BeginDeletion before and after EndDeletion.


TdxMasterViewList.Destroy

TdxMasterViewList

Destroys an instance of the TdxMasterViewList object.

destructor Destroy; override;

Description

The Destroy method frees the memory used to store a list of items.


TdxMasterViewList.EndDeletion

TdxMasterViewList          See Also

Unlocks TdxMasterView list refresh.

procedure EndDeletion;

Description

When deleting or inserting new nodes, the TdxMasterView object must be locked, since the list recalculates all indexes.   Call the EndDeletion method after deleting to recalculate the indexes and set new values for the Count and Capacity properties.  Every call of this method decreases the internal counter by one.  Every call of the BeginDeletion method increases the internal counter by one.  Make certain that you call the EndDeletion method after each call of the BeginDeletion method.  Use these methods in the same procedure.

Note: You cannot use the BeginDeletion and EndDeletion methods together with the BeginInsertion and EndInsertion methods.


TdxMasterViewList.EndInsertion

TdxMasterViewList          See Also

Unlocks TdxMasterView list refresh.

procedure EndInsertion;

Description

When deleting or inserting new nodes, the TdxMasterView object must be locked since the list recalculates all indexes.   Call the EndInsertion method after inserting an item to recalculate the indexes.  Every call of this method decreases the internal counter by one.  Every call of the BeginInsertion method increases the internal counter by one.  Make certain that you call the EndInsertion method after each call of the BeginInsertion method.  Use these methods in the same procedure.

Note: It is prohibited to use the BeginInsertion and EndInsertion methods together with the BeginDeletion and EndDeletion methods.


TdxMasterViewList.Error

TdxMasterViewList

Raises an EListError exception.

class procedure Error(const Msg: string; Data: Integer);

Description

Call the Error method to raise an exception when an error occurs while working with the TdxMasterViewList object.  This method assembles an error message from the format string passed as the Msg parameter and the data value passed as the Data parameter, and then raises an EListError exception.


TdxMasterViewList.First

TdxMasterViewList          See Also

Returns the first node.

function First: TdxMasterViewNode;

Description

Call the First method to obtain the first MasterView node in the appropriate list.


TdxMasterViewList.IndexOf

TdxMasterViewList          See Also

Returns the index of a specified node.

function IndexOf(Item: TdxMasterViewNode): Integer;

Description

Call the IndexOf method to get the index of a node specified by the Item parameter.  The first node in the list has an index of 0, the second node has an index of 1, etc.  If an node cannot be located in the list, IndexOf returns -1.


TdxMasterViewList.Insert

TdxMasterViewList          See Also

Adds a node to the appropriate list.

procedure Insert(Index: Integer; Item: TdxMasterViewNode);

Description

Call the Insert method to add a new node to a position specified by the Index parameter.  The index is zero-based, so the first node has an index of 0.  The Item parameter determines the node to insert.

Note: Call the BeginInsertion method before and the EndInsertion method after calling the Insert method to recalculate all indexes.


TdxMasterViewList.Last

TdxMasterViewList          See Also

Returns the last node.

function Last: TdxMasterViewNode;

Description

Call the Last method to obtain the last MasterView node in the appropriate list.


TdxMasterViewList.Move

TdxMasterViewList          See Also

Changes the position of a node in the list.

procedure Move(CurIndex, NewIndex: Integer);

Description

Call the Move method to move a node to a new position in the list.  The CurIndex parameter determines initial position.  NewIndex is the final position.  The CurIndex and NewIndex parameters represent zero-based indexes.


TdxMasterViewList.Remove

TdxMasterViewList          See Also

Deletes a node from the appropriate MasterView list.

function Remove(Item: TdxMasterViewNode): Integer;

Description

Call the Remove method to remove a specific node from the list when its index is unknown.  The Item parameter determines the node to remove.  The Remove method returns the index of a node in the list before it was removed.

Note: Call the BeginDeletion method before and the EndDeletion method after calling the Delete method.


TdxMasterViewList.Sort

TdxMasterViewList          See Also

Performs a QuickSort within a list based on the comparison function Compare.

type

 TdxMasterViewListSortCompare = function (Item1, Item2: TdxMasterViewNode): Integer;

procedure Sort(Compare: TdxMasterViewListSortCompare; TopBound, BottomBound: Integer);

Description

Call the Sort method to sort nodes in the list.  The TopBound and BottomBound parameters determine sort boundaries.  Compare is a comparison function that indicates item order.  Compare returns < 0, if Item1 is less than Item2; 0, if they are equal, and > 0 if Item1 is greater than Item2.


TdxMasterViewNode
TdxMasterViewNode Object

Hierarchy          Properties          Methods

A TdxMasterViewNode object represents a single node within the ExpressMasterView.

Unit

dxMasterView

Declaration

TdxMasterViewNode = class(TObject);

Description

The TdxMasterViewNode object is used to organize the structure of a MasterView control.  There are 3 types of nodes: caption, group and data.  Every data node is associated with a given record in a dataset.


Hierarchy

TObject

     |


TdxMasterViewNode Properties

TdxMasterViewNode          Legend

In TdxMasterViewNode

AbsoluteIndex

Control

Count

CountInLevel

Data

Expanded

First

FirstInLevel

Focused

GroupIndex

GroupValue

GroupValueText

HasChildren

Horizontal

ID

Index

IsEditing

IsFirst

IsFirstInLevel

IsLast

IsLastInLevel

Items

ItemsList

KeyValue

Last

LastInLevel

Level

NodeType

ParentNode

ParentNodes

ParentNodeWithData

PreviewText

Selected

SelectedIndex

StringCount

Strings

ValueCount

Values

Visible


TdxMasterViewNode Methods

TdxMasterViewNode          Legend

In TdxMasterViewNode

Collapse

Create

Delete

Destroy

Expand

FindChildren

GetParentNode

MakeVisible

NodeFromID

NodeFromKeyValue


TdxMasterViewNode.AbsoluteIndex

TdxMasterViewNode          See Also

Indicates the absolute index of the TdxMasterViewNode.

property AbsoluteIndex : Integer;

Description

Use the AbsoluteIndex to determine the absolute position of a node in the list of expanded MasterView nodes specified by the AbsoluteItemsList property.  The first MasterView node has an index of 0 and subsequent nodes are numbered sequentially.  If a TdxMasterViewNode object has children, its AbsoluteIndex property value is one less than the index of its first child.  A child may be invisible and its AbsoluteIndex property value is equal to -1.

ReadOnly Property


TdxMasterViewNode.Control

TdxMasterViewNode

Returns a parent control.

property Control : TdxMasterView;

Description

This property is designed for internal use and returns a parent TdxMasterView instance.


TdxMasterViewNode.Count

TdxMasterViewNode           See Also

Indicates the number of child nodes.

property Count : Integer;

Description

Use the Count property to determine how many child nodes belong to a specific TdxMasterViewNode object.  This property only includes direct children.  The Count property can be useful when iterating through a node’s children.

ReadOnly Property


TdxMasterViewNode.CountInLevel

TdxMasterViewNode           See Also

Indicates the number of child nodes within a specific level.

property CountInLevel[ALevel:TdxMasterViewLevel] : Integer;

Description

Use the CountInLevel property to determine how many child nodes belong to a specific TdxMasterViewNode object at the level specified by the ALevel parameter level.

ReadOnly Property


TdxMasterViewNode.Data

TdxMasterViewNode

Points to application-defined data associated with a TdxMasterViewNode object.

property Data : Pointer;

Description

Use the Data property to associate data with a TdxMasterViewNode object.  The Data property allows applications to quickly access information on an entity represented by a node.


TdxMasterViewNode.Expanded

TdxMasterViewNode

Determines whether a TdxMasterViewNode object is expanded.

property Expanded : Boolean;

Description

When a MasterView node is expanded, a minus button is dispalyed and child nodes are displayed.  Set Expanded to True to display node children.  Set Expanded to False to collapse a node, hiding all its descendants.

Property’s Value	Example
True
False


TdxMasterViewNode.First

TdxMasterViewNode          See Also

Returns the first child node.

property First : TdxMasterViewNode;

Description

Use the First property to obtain the first child node of a specific node.  This property includes only direct children.

ReadOnly Property


TdxMasterViewNode.FirstInLevel

TdxMasterViewNode          See Also

Returns the first child node within a specified level.

property FirstInLevel[ALevel: TdxMasterViewLevel] : TdxMasterViewNode;

Description

Use the FirstInLevel property to obtain the first child node in the level specified by the ALevel parameter.

ReadOnly Property


TdxMasterViewNode.Focused

TdxMasterViewNode          See Also

Determines whether a node has focus.

property Focused : Boolean;

Description

Use the Focused property to determine whether a specific MasterView node has focus.  When the Focused property is True, a node is surrounded by a standard focus rectangle; Otherwise False.


TdxMasterViewNode.GroupIndex

TdxMasterViewNode         Example

Specifies the index of a node among other grouped nodes.

property GroupIndex : Integer;

Description

Use the GroupIndex property to determine a grouped level.  If a node is not a grouped node, its GroupIndex property is equal to  -1.  The default value is -1.

ReadOnly Property


TdxMasterViewNode.GroupValue

TdxMasterViewNode          See Also

Represents the group value for a node.

property GroupValue : Variant;

Description

Use the GroupValue property to obtain the value for a grouped node as it is stored in a field.  You should note the differences between the GroupValue and GroupValueText properties.  For instance, the GroupValue property may contain False or True for a Boolean field, but the GroupValueText property can represent the same values as 'Happy' or 'Unhappy'.

ReadOnly Property


TdxMasterViewNode.GroupValueText

TdxMasterViewNode          See Also

Is the textual representation of a node’s group value.

property GroupValueText : Variant;

Description

Use the GroupValueText property to obtain a field value for a grouped node as it is displayed in the MasterView control.  You should note the differences between the GroupValue and GroupValueText properties.  For instance, the GroupValue property may contain False or True for a Boolean field, but the GroupValueText property can represent the same values as 'Happy' or 'Unhappy'.

ReadOnly Property


TdxMasterViewNode.HasChildren

TdxMasterViewNode

Specifies whether a node has children.

property HasChildren : Boolean;

Description

The HasChildren property is True, if a node has subnodes; Otherwise False.  If this property is True, a plus (+) button appears to the left of a node when it is collapsed and a minus (-) button  appears when a node is expanded.

ReadOnly Property


TdxMasterViewNode.Horizontal

TdxMasterViewNode          See Also

Indicates which view mode type is applied to a node.

property Horizontal : Boolean;

Description

Use the Horizontal property to determine column header arrangement within a node.  This property is True, if column headers are arranged horizontally; Otherwise False.

Property’s Value	Example
True
False

ReadOnly Property


TdxMasterViewNode.ID

TdxMasterViewNode          See Also

Represents a node ‘id’.

property Id : Variant;

Description

Every MasterView node corresponds to a dataset record.  This property contains a unique value determined by the ID field(s) of this record.  An ID field(s) is specified by the ID property of the TdxMasterViewLevel object.

ReadOnly Property


TdxMasterViewNode.Index

TdxMasterViewNode

Specifies the position of a node in the list of child nodes maintained by its parent node.

property Index : Integer;

Description

The Index property determines the position of a specific node in the Items array of its parent node.  If the Index property is 0, this node is the first child of its parent node.

ReadOnly Property


TdxMasterViewNode.IsEditing

TdxMasterViewNode

Indicates the state of an associated record.

property IsEditing : Boolean;

Description

Every MasterView node corresponds to a dataset record.  Use the IsEditing property to determine whether an associated record is being edited.  If a record is in an edit state, this property returns True; Otherwise False.

ReadOnly Property


TdxMasterViewNode.IsFirst

TdxMasterViewNode          See Also

Indicates whether a node is the first node in the ExpressMasterView.

property IsFirst : Boolean;

Description

Use the IsFirst property to determine whether a node is the first node at the top of a MasterView control.

ReadOnly Property


TdxMasterViewNode.IsFirstInLevel

TdxMasterViewNode          See Also

Indicates whether a node is the first in a level.

property IsFirstInLevel : Boolean;

Description

Use the IsFirstInLevel property to determine whether a node is the first node at a specific level.

ReadOnly Property


TdxMasterViewNode.IsLast

TdxMasterViewNode          See Also

Indicates whether a node is the last node in the ExpressMasterView.

property IsLast : Boolean;

Description

Use the IsLast property to determine whether a node is the last node in the MasterView control.

ReadOnly Property


TdxMasterViewNode.IsLastInLevel

TdxMasterViewNode          See Also

Indicates whether a node is the last in a level.

property IsLastInLevel : Boolean;

Description

Use the IsLastInLevel property to determine whether a node is the last node at a specific level.

ReadOnly Property


TdxMasterViewNode.Items

TdxMasterViewNode          See Also

Contains an array of child nodes.

property Items[Index: Integer] : TdxMasterViewNode;

Description

Use the Items property to access a child of a specific node.  The Index parameter determines the index of a child node in list of child nodes.  The index of the first child node is 0.  The total number of TdxMasterViewtNode child objects is returned by the Count property.


TdxMasterViewNode.ItemsList

TdxMasterViewNode          See Also

Returns the list of child nodes of a node.

property ItemsList : TdxMasterViewList;

Description

Use the ItemsList property to obtain a TdxMasterViewList object which contains the list of child nodes of a given node.

ReadOnly Property


TdxMasterViewNode.KeyValue

TdxMasterViewNode          See Also

Represents the key value for a node.

property KeyValue : Variant;

Description

Every data node in a MasterView control corresponds to a dataset record.  Master-detail relationships are established via the Key value (MasterKey at the parent level, DetailKey at the child level).  The KeyValue property returns this value for a node.

ReadOnly Property


TdxMasterViewNode.Last

TdxMasterViewNode          See Also

Returns the last child node.

property Last : TdxMasterViewNode;

Description

Use the Last property to obtain the last child node of a specific TdxMasterViewNode object.  This property includes only direct children.

ReadOnly Property


TdxMasterViewNode.LastInLevel

TdxMasterViewNode          See Also

Returns the last child node at a specified level.

property LastInLevel[ALevel: TdxMasterViewLevel] : TdxMasterViewNode;

Description

Use the LastInLevel property to obtain the last child node at a level specified by the ALevel parameter.

ReadOnly Property


TdxMasterViewNode.Level

TdxMasterViewNode          See Also

Determines a node level.

property Level : TdxMasterViewLevel;

Description

Use the Level property to access the level to which a specific node belongs.

ReadOnly Property


TdxMasterViewNode.NodeType

TdxMasterViewNode          Example

Indicates node type.

type

  TdxMasterViewNodeType = (ntData, ntCaption, ntGroup);

property NodeType : TdxMasterViewNodeType;

Description

Use this property to determine node type.  The available values include:

Value	Meaning
ntData	A standard node that contains data from a dataset.
ntCaption	A node that represents the caption for a level.
ntGroup	A grouped node.

ReadOnly Property


TdxMasterViewNode.ParentNode

TdxMasterViewNode          See Also

Specifies the parent node for a TdxMasterViewNode object.

property ParentNode : TdxMasterViewNode;

Description

A parent node is one level higher than a specified node and contains this node as a subnode.

ReadOnly Property


TdxMasterViewNode.ParentNodes

TdxMasterViewNode          See Also

Specifies all parent nodes for a TdxMasterViewNode object.

property ParentNodes[Index: Integer] : TdxMasterViewNode;

Description

Use the ParentNodes property to obtain all parent nodes.  The Index parameter determines the level of a parent node relative to the position of a specific node.  Zero index returns the node itself.  The last returned parent node is the Root level.

ReadOnly Property


TdxMasterViewNode.ParentNodeWithData

TdxMasterViewNode          See Also

Specifies the first parent node with data for a TdxMasterViewNode object.

property ParentNodeWithData : TdxMasterViewNode;

Description

Use the ParentNodeWithData property to obtain the parent node whose NodeData property is equal to ntData.  The parent node with data can be several levels higher than a specific node.

ReadOnly Property


TdxMasterViewNode.PreviewText

TdxMasterViewNode

Determines preview text.

property PreviewText : string;

Description

Use the PreviewText property to set or return the preview section text for a specific node.


TdxMasterViewNode.Selected

TdxMasterViewNode          See Also

Determines whether a specific TdxMasterViewNode object is selected.

property Selected : Boolean;

Description

Set the Selected property to True to select a node.  A node is selected if it has focus or if it is included in multi-select operations.  When a node is selected, the OnSelectNode and OnSelectionChanged events of the TdxMasterView object are generated.


TdxMasterViewNode.SelectedIndex

TdxMasterViewNode          See Also

Indicates the index of a node among selected nodes.

property SelectedIndex : Integer;

Description

Use SelectedIndex to determine the position of a node in the the list of selected MasterView nodes.  The first selected MasterView node has an index of 0 and subsequent nodes are numbered sequentially.

ReadOnly Property


TdxMasterViewNode.StringCount

TdxMasterViewNode          See Also

Returns the number of elements in the Strings array.

property StringCount : Integer;

Description

A TdxMasterViewNode object can incorporate columns.   Displayed text for these columns is stored in the Strings property.  The StringCount property returns the number of displayed strings in a node.

ReadOnly Property


TdxMasterViewNode.Strings

TdxMasterViewNode          See Also          Example

Contains strings that appear as column text for a TdxMasterViewNode object.

property Strings[Index : Integer] : String;

Description

Use Strings to work with strings that appear in columns of a TdxMasterView control node.  The Index parameter determines the column to which a string is applied.  The Index is zero-based.

ReadOnly Property


TdxMasterViewNode.ValueCount

TdxMasterViewNode          See Also

Returns the number of elements in the Values array.

property ValueCount : Integer;

Description

A TdxMasterViewNode object can incorporate several columns.  Values of these columns are stored in the Values property.  The ValueCount property returns the number of column values in a node.

ReadOnly Property


TdxMasterViewNode.Values

TdxMasterViewNode          See Also          Example

Provides an array of variant type for column values of a TdxMasterViewNode object.

property Values[Index: Integer] : Variant;

Description

This array contains column values for a specific TdxMasterViewNode object.  The Index parameter determines the column to which a value is applied.  The Index is zero-based.

ReadOnly Property


TdxMasterViewNode.Visible

TdxMasterViewNode

Determines whether a node is visible.

property Visible : Boolean;

Description

Use the Visible property to determine if a specific expanded node is visible on screen.

ReadOnly Property


TdxMasterViewNode.Collapse

TdxMasterViewNode          See Also

Collapses a TdxMasterViewNode object.

procedure Collapse(Recurse: Boolean);

Description

Call the Collapse method to collapse a MasterView node.  All subnodes are hidden.  If the Recurse parameter is set to True, all subnodes are collapsed as well.  When a node is expanded next, children are still collapsed.  If the Recurse parameter is set to False, child nodes aren’t collapsed and next time a node is expanded, children will remain in the same state as when the Collapse method was called.


TdxMasterViewNode.Create

TdxMasterViewNode

Creates an instance of the TdxMasterViewNode object.

type

  TdxMasterViewNodeType = (ntData, ntCaption, ntGroup);

constructor Create(AControl: TdxMasterView; ALevel: TdxMasterViewLevel; AParentNode: TdxMasterViewNode; AIndex: Integer; ANodeType: TdxMasterViewNodeType; const AID, AKeyValue: Variant);

Description

The Create method is used internally to create a node.  The AControl parameter specifies a MasterView control to which the created node belongs.  The ALevel parameter specifies the level into which this node is inserted.  The AParentNode parameter specifies the parent node of the newly created node.  The AIndex parameter determines the position of a TdxMasterViewNode object in the list of child nodes maintained by its parent node.  The ANodeType parameter sets the type of node.  The AID and AKeyValue parameters determine the ID field value and the key value of the node accordingly.


TdxMasterViewNode.Delete

TdxMasterViewNode

Deletes a record associated with a MasterView node.

procedure Delete;

Description

Call the Delete method to remove a record from the dataset and a node that represents this record in a MasterView control.  This method also deletes child nodes of a specific node and tries to delete appropriate records.  Records are deleted if they can be located via the MasterView structure.


TdxMasterViewNode.Destroy

TdxMasterViewNode

Destroys a TdxMasterViewNode object.

destructor Destroy;  override;

Description

Destroys a TdxMasterViewNode instance and frees its memory.   Deletion of a separate visible node refreshes the control that owns TdxMasterViewNode objects.


TdxMasterViewNode.Expand

TdxMasterViewNode          See Also

Expands a MasterView node to display all child nodes.

procedure Expand(Recurse: Boolean);

Description

When a node expands, its immediate subnodes are displayed.  A minus '-' button is displayed to the left of it.  If the Recurse parameter is True, all descendants of immediate subnodes are expanded as well.


TdxMasterViewNode.FindChildren

TdxMasterViewNode          See Also

Searches for child nodes within a dataset.

function FindChildren: Boolean;

Description

Every MasterView node corresponds to a dataset record.  The FindChildren method attempts to locate the dataset records which may be child nodes for a specific parent node.  If such record(s) are present, this method returns True; Otherwise False.

Note:  When the lodSmartLoad option of the OptionsDB property of the TdxMasterViewLevel is active, child nodes are not created for parent nodes which are not expanded, whereas appropriate records do exist in the dataset.


TdxMasterViewNode.GetParentNode

TdxMasterViewNode          See Also

Returns the parent node of a specifed MasterView node.

function GetParentNode(ALevel: TdxMasterViewLevel; OnlyDataNodes: Boolean): TdxMasterViewNode;

Description

Call the GetParentNode method to obtain a parent node within the level specified by the ALevel parameter.  The OnlyDataNodes parameter determines the type of a parent node.  If True, this method returnes the first parent node of the data type; Otherwise it returnes the first parent node of any type.


TdxMasterViewNode.MakeVisible

TdxMasterViewNode          See Also

Expands a node.

procedure MakeVisible;

Description

Makes a specified MasterView node visible on screen.  If a parent node(s) is collapsed and the node is invisible, this method expands its parent(s) to make it visible.


TdxMasterViewNode.NodeFromID

TdxMasterViewNode          See Also

Returns a child node by its 'ID' value.

function NodeFromID(ALevel: TdxMasterViewLevel; const AID: Variant): TdxMasterViewNode;

Description

Because every MasterView node corresponds to a dataset record, it is identified by a unique value.  This value consists of one or more field values specified by the ID property.  The NodeFromID method returns a child node that corresponds to the record with the ID property value equal to the AID parameter.  The search is performed within the level specified by the ALevel parameter.


TdxMasterViewNode.NodeFromKeyValue

TdxMasterViewNode          See Also

Returns a child node by its key value.

function NodeFromKeyValue(ALevel: TdxMasterViewLevel; AChildIndex: Integer; const AKeyValue: Variant): TdxMasterViewNode;

Description

Every data node in a MasterView control corresponds to a dataset record.  Master-detail relationships are established via the Key value (MasterKey at the parent level, DetailKey at the child level).  The NodeFromKeyValue method returns a child node for a specified node which corresponds to the record with the Key field value equal to AKeyValue.  Because the level of a specified node can incorporate several child levels, its key values represent a zero-based array.  The AChildIndex parameter of this method specifies the element of this array, that is the child level.  The ALevel parameter specifies the level at which the search is performed.


TdxMasterViewStyle
TdxMasterViewStyle Object

Hierarchy          Properties

A TdxMasterViewStyle object represents an individual style within the ExpressMasterView.

Unit

dxMasterView

Declaration

TdxMasterViewStyle = class(TComponent);

Description

TdxMasterViewStyle objects are used to implement different styles for all parts of a MasterView control.  A user can color an application to accentuate important sections and to ease readability.


Hierarchy

TComponent

     |


TdxMasterViewStyle Properties

TdxMasterViewStyle          Legend

In TdxMasterViewStyle

AnotherColor

AssignedValues

Color

Control

Font

Index


TdxMasterViewStyle.AnotherColor

TdxMasterViewStyle          See Also

Specifies a different background color for odd numbered grid rows.

property AnotherColor : TColor;

Description

The ExpressMasterView allows a user to set a different background color for data nodes with odd indexes.  The first MasterView node has an index of 0 and subsequent nodes are numbered sequentially.  Use the AnotherColor property to specify a new color for such nodes.


TdxMasterViewStyle.AssignedValues

TdxMasterViewStyle

Indicates which properties have been assigned to a MasterView style.

type

  TdxMasterViewStyleValue = (svAnotherColor, svColor, svFont);

  TdxMasterViewStyleValues = set of TdxMasterViewStyleValue;

property AssignedValues : TdxMasterViewStyleValues;

Description

The TdxMasterViewStyleValues type defines a set of possible state flags for the AssignedValues property.  Except for the default, the component uses assigned values, when implementing a style.  The following table lists the possible values for a TdxMasterViewStyleValues object and explains the meaning of each flag:

Value	Meaning
svAnotherColor	The AnotherColor property has been assigned.
svColor	The Color property has been assigned.
svFont	The Font property has been assigned.


TdxMasterViewStyle.Color

TdxMasterViewStyle          See Also

Specifies the background color for a node.

property Color : TColor;

Description

The Color property specifies the background color for a node to which a specific style is applied.  You can set the Color property to one of the constants defined in the Graphics unit (such as clBlue), or to an explicit RGB integer value.


TdxMasterViewStyle.Control

TdxMasterViewStyle

Returns a parent control.

property Control : TdxMasterView;

Description

This property is designed for internal use and returns a parent TdxMasterView instance.


TdxMasterViewStyle.Font

TdxMasterViewStyle

Specifies the font by which a node displays its data.

property Font : TFont;

Description

The Font property points to a TFont object that determines typographic attributes of text displayed in a node to which a specific style is applied.


TdxMasterViewStyle.Index

TdxMasterViewStyle

Determines the index of a style among MasterView styles.

property Index : integer;

Description

The Index property determines the index of a specific style in the list of MasterView styles.  The index of the first style of the TdxMasterView object is 0.


dxMVGroupByBoxText variable
dxMVGroupByBoxText global variable

Example

Unit

dxMasterView

dxMVGroupByBoxText : string;

Description

This global variable represents the text drawn on the group panel.  By default, this text is "Drag a column header here to group by that column".  Use this variable to specify your own text for the group panel.


Legend

Published

ReadOnly


Bind the ExpressMasterView with Data

To start using the ExpressMasterView, drop both a Dataset and Datasource control on a form and set them to the appropriate values. Add as many datasets as you require to help establish your master/detail relationships.

1.	Start a new project.

2.	Place a TTable component onto a form or a data module.  Set its DatabaseName property within the Object Inspector to DBDEMOS (or BCDEMOS if you use C++Builder).

3.	Move to the TableName property of the TTable component and set it to "CUSTOMER.DB".

4.	Set the Active property of the TTable to True.

5.	Place a TDataSource component onto your form.  Set its DataSet property to the names of the TTable component created earlier.

When the datasets you wish to access are defined, you are ready to establish ExpressMasterView Levels


Managing ExpressMasterView Levels

After you define datasets you wish to display within the MasterView, you are ready to define the different levels of the control.

1.	Navigate to the ExpressMasterView page of the Component Palette.  Select the dxMasterView component and drop it onto a form.

2.	Double click the component or select the «Designer…» option from the popup menu.

3.	The Designer, pictured below, is activated.

4.	The Designer window displays all levels created in the current ExpressMasterView component.  At present only the Root level is displayed.  This level is invisible.  Select the <Root> node in the Levels section of the editor and click add.  This will add a top level from which you will build the rest of your master/detail relationships.  You can have any number of top levels, each displaying its own unique relationship hierarchy or different views of the same hierarchy.

5.	A new level is generated automatically.  This level becomes active and the Object Inspector displays its properties.  Set the Name property to "lvlCustomers".  Press the "Add" button to create a child level - "lvlOrders".  Remember that this button adds the child level to the currently selected level.  So you have to select the Root level again to create a level, which is independent of the previously created level.

6.	It’s time to connect the levels to the appropriate datasets.  Press the Data tab located below the level tree window.  The following window will appear on screen:

7.	Currently there is no associated dataset.  Using this window or the Object Inspector, you must set the DataSource property to specify a dataset and the ID property to specify a field in this dataset.  Remember the field specified in the ID property must contain unique values to support dataset synchronization during navigation.  Since this is the topmost level, other properties are disabled.

Note: The ExpressMasterView builds master-detail relationship itself.  You should NOT setup it via your dataset components.

8.	When working with the child level you must set two other properties: MasterKey and DetailKey to establish master-detail relationship between levels.  The detail dataset must be sorted by the DetailKey field.  The MasterDataSource property represents the dataset of the parent level.

9.	The column page displays all columns associated with the currently selected level.  To add all columns of your dataset, press the "Add All" command button.  To add a new column, press the Add button.  The following window appears:

10.	Here is the result obtained during master-detail customization:


Customizing ExpressMasterView Styles

The ExpressMasterView allows you to fully control the display characteristics of the control as your programming needs dictate. You can apply different styles to the captions, content, footers, group panels, groups, headers, and preview sections.

To create and apply styles:

1.	Double click the ExpressMasterView component or select the «Designer…» option from the popup menu.

2.	Switch to the Styles tab in the Designer.  The window, pictured below, will be activated.

3.	Add two styles (ContentStyle and HeaderStyle) and customize them via the Object Inspector, as displayed below:

4.	The following styles appear in the Designer Window.

5.	Shift to the Main tab and select the level to which you wish to apply these styles, then set the appropriate styles for the ContentStyle and HeaderStyle properties in the Object Inspector:

6.	The result of applying these styles is as follows:


ExpressMasterView Overview

ExpressMasterView is a new 100% native VCL grid component by Developer Express and is specifically designed for Delphi and C++ Builder developers who need to represent multiple datasets in a hierarchical manner within a single grid control. With ExpressMasterView, you can finally give your end-users a way to view master/detail and self-referencing data in an intuitive manner - in one elegant component!

The ExpressMasterView allows you to organize data into levels, with each level representing a different dataset. Every single level includes its own properties, methods, and events which can be used to completely manage the grid's behavior and runtime display.

With ExpressMasterView, you can enable:

•	Runtime Grouping

•	Automatic Sorting

•	Automatic Column Customization

•	Summary Calculations including: AVG, COUNT, MAX, MIN, SUM

•	And much more…

Features include:

•	Layout storing to the Registry or INI-file

•	ANSI compare options for sorting

•	Multi-select

•	Automatic column width support

•	Customization form control for all Master/Detail Levels

•	Summaries and footers at all Master/Detail Levels

•	Multi-Row Headers/Cells for all Master/Detail Levels

•	Automatic Data Grouping at all Master/Detail levels

•	Smart-load and refresh mechanisms for all Master/Detail Levels

•	MS Outlook® style preview for all Master/Detail Levels

•	Horizontal and vertical display modes at all Master/Detail Levels

•	Automatic column sorting against an unlimited number of columns at all Master/Detail Levels

The ExpressMasterView includes four unique columns that provide easy data viewing facilities.  The columns allow you to display text, check boxes, images and graphics directly within individual cells.

Note: The ExpressMasterView is a read/only control. You can display and view data within it, but data editing is not available.


HeaderGlyph Example

The following example demonstrates how to add a glyph to a column header.  Make certain that you have a TOpenPictureDialog object placed onto the form.

//Delphi

procedure TfmMain.btnGlyphClick(Sender: TObject);

var

  B: TBitmap;

begin

  if odpOpenGlyph.Execute then begin

    B := TBitMap.Create;

    try

      B.LoadFromFile(odpOpenGlyph.FileName);

      if CurrentColumn <> nil then

        CurrentColumn.HeaderGlyph := B;

    finally

      B.Free;

    end;

  end;

end;

//C++ Builder

void __fastcall TfmMain::btnGlyphClick(TObject *Sender)

{

  if (odpOpenGlyph->Execute()) {

    Graphics::TBitmap *B = new Graphics::TBitmap();

    try

    {

      B->LoadFromFile(odpOpenGlyph->FileName);

      if (CurrentColumn != NULL)

        CurrentColumn->HeaderGlyph = B;

    }

    __finally

    {

      B->Free();

    };

  }

}


Styles Example

This example illustrates how to apply different styles at runtime.

//Delphi

...

    Style1: TdxMasterViewStyle;

    GroupStyle1: TdxMasterViewStyle;

    GroupStyle2: TdxMasterViewStyle;

    GroupStyle3: TdxMasterViewStyle;

    Style2: TdxMasterViewStyle;

    chbPaymentMethod: TCheckBox;

    cmbPaymentMethod: TComboBox;

    chbAmountPaid: TCheckBox;

    sedAmountPaid: TSpinEdit;

...

//Specifies group styles for differnet grouped nodes

procedure TfmMain.Level1GetGroupStyle(Sender: TdxMasterViewLevel;

  Node: TdxMasterViewNode; Column: TdxMasterViewColumn;

  var NewStyle: TdxMasterViewStyle);

begin

  case Node.GroupIndex of

    0: NewStyle := GroupStyle1;

    1: NewStyle := GroupStyle2;

    2: NewStyle := GroupStyle3;

  else

    NewStyle := Style1;

  end

end;

//Specifies style according to the payment method

procedure TfmMain.Level1GetContentStyle(Sender: TdxMasterViewLevel;

  Node: TdxMasterViewNode; Column: TdxMasterViewColumn;

  var NewStyle: TdxMasterViewStyle);

var

  ColInd: Integer;

begin

  ColInd := dxMasterView1Level1PaymentMethod.Index;

  if chbPaymentMethod.Checked then

    if Node.NodeType = ntData then

      if (Node.Strings[ColInd] = cmbPaymentMethod.Text) then

        NewStyle := Style2;

end;

//Specifies style according to a number

procedure TfmMain.dxMasterView1Level1AmountPaidGetContentStyle(

  Sender: TdxMasterViewColumn; Node: TdxMasterViewNode;

  var NewStyle: TdxMasterViewStyle);

begin

    if chbAmountPaid.Checked then

      if Node.NodeType = ntData then

        if ((Node.Values[Sender.Index]) > sedAmountPaid.Value) then

          NewStyle := Style1;

end;

//C++ Builder

//Specifies group styles for different grouped nodes

void __fastcall TfmMain::Level1GetGroupStyle(TdxMasterViewLevel *Sender,

      TdxMasterViewNode *Node, TdxMasterViewColumn *Column,

      TdxMasterViewStyle *&NewStyle)

{

  switch (Node->GroupIndex) {

    case 0: NewStyle = GroupStyle1; break;

    case 1: NewStyle = GroupStyle2; break;

    case 2: NewStyle = GroupStyle3; break;

  default :

    NewStyle = Style1;

  }

}

//Specifies style according to the payment method

void __fastcall TfmMain::Level1GetContentStyle(TdxMasterViewLevel *Sender,

      TdxMasterViewNode *Node, TdxMasterViewColumn *Column,

      TdxMasterViewStyle *&NewStyle)

{

  int ColInd = dxMasterView1Level1PaymentMethod->Index;

  if (chbPaymantMethod->Checked)

    if (Node->NodeType == ntData)

      if (Node->Strings[ColInd] == cmbPaymentMethod->Text)

        NewStyle = Style2;

}

//Specifies style according to a number

void __fastcall TfmMain::dxMasterView1Level1AmountPaidGetContentStyle(

      TdxMasterViewColumn *Sender, TdxMasterViewNode *Node,

      TdxMasterViewStyle *&NewStyle)

{

    if (chbAmountPaid->Checked)

      if (Node->NodeType == ntData)

        if ((int)(Node->Values[Sender->Index]) > sedAmountPaid->Value)

          NewStyle = Style1;

}


GroupByBox Text Example

This example demonstrates how to change the caption of a group panel at runtime.

//Delphi

procedure TfmMain.FormCreate(Sender: TObject);

begin

dxMVGroupByBoxText := 'Group several columns to receive a new style for each grouped node';

end;

//C++Builder

void __fastcall TfmMain::FormCreate(TObject *Sender)

{

dxMVGroupByBoxText = "Group several columns to receive a new style for each grouped node";

}


Expanding Example

This example demonstrates how to use a query when expanding a data node.

//Delphi

...

RadioGroup1: TRadioGroup;

Query1: TQuery;

...

procedure TfmMain.lvlCustomersExpanding(Sender: TdxMasterViewLevel;

  Node: TdxMasterViewNode; var Allow: Boolean);

begin

  if Node.NodeType = ntData then

  begin

    if RadioGroup1.ItemIndex = 0 then Sender.Control.BeginLayout;

    try

      with Query1 do

      begin

        Params[0].Value := Node.Values[lvlCustomersCustNo.Index];

        Active := False;

        Active := True;

      end;

    finally

      if RadioGroup1.ItemIndex = 0 then Sender.Control.CancelLayout;

    end;

  end;

end;

//C++ Builder

void __fastcall TfmMain::lvlCustomersExpanding(TdxMasterViewLevel *Sender, TdxMasterViewNode *Node, bool &Allow)

{

  if (Node->NodeType == ntData) {

    if (RadioGroup1->ItemIndex == 0) Sender->Control->BeginLayout();

    try {

      //with Query1 do

        Query1->Params->Items[0]->Value = Node->Values[lvlCustomersCustNo->Index];

        Query1->Active = False;

        Query1->Active = True;

      }

    __finally

    {

      if (RadioGroup1->ItemIndex == 0) Sender->Control->CancelLayout();

    };

  };

}


MasterView Options Example

This example demonstrates how to enable/disable ExpressMasterView options at runtime.

//Delphi

procedure TfmMain.chbMultiSelectClick(Sender: TObject);

begin

  with MasterView, TCheckBox(Sender) do begin

    case TCheckBox(Sender).Tag of

// Enables/disables the MultiSelect option

    0 : if Checked then

          OptionsBehavior := OptionsBehavior + [mobMultiSelect]

        else

          OptionsBehavior := OptionsBehavior - [mobMultiSelect];

// Enables/disables the UseIndent option

    1 : if Checked then

          OptionsBehavior := OptionsBehavior + [mobUseIndent]

        else

          OptionsBehavior := OptionsBehavior - [mobUseIndent];

// Enables/disables the Animation option

    2 : if Checked then

          OptionsView := OptionsView + [movAnimation]

        else

          OptionsView := OptionsView - [movAnimation];

// Enables/disables the AutoColumnWidth option

    3 : if Checked then

          OptionsView := OptionsView + [movAutoColumnWidth]

        else

          OptionsView := OptionsView - [movAutoColumnWidth];

// Enables/disables the DrawEndEllipsis option

    4 : if Checked then

          OptionsView := OptionsView + [movDrawEndEllipsis]

        else

          OptionsView := OptionsView - [movDrawEndEllipsis];

// Enables/disables the HideFocusRect option

    5 : if Checked then

          OptionsView := OptionsView + [movHideFocusRect]

        else

          OptionsView := OptionsView - [movHideFocusRect];

// Enables/disables the HideSelection option

    6 : if Checked then

          OptionsView := OptionsView + [movHideSelection]

        else

          OptionsView := OptionsView - [movHideSelection];

// Enables/disables the KeepColumnWidth option

    7 : if Checked then

          OptionsView := OptionsView + [movKeepColumnWidths]

        else

          OptionsView := OptionsView - [movKeepColumnWidths];

// Enables/disables the TransparentDragAndDrop option

    8 : if Checked then

          OptionsView := OptionsView + [movTransparentDragAndDrop]

        else

          OptionsView := OptionsView - [movTransparentDragAndDrop];

// Enables/disables the UseBitmap option

    9 : if Checked then

          OptionsView := OptionsView + [movUseBitmap]

        else

          OptionsView := OptionsView - [movUseBitmap];

// Enables/disables the UseBitmapToDrawPreview option

   10 : if Checked then

          OptionsView := OptionsView + [movUseBitmapToDrawPreview]

        else

          OptionsView := OptionsView - [movUseBitmapToDrawPreview];

    end;

  end;

end;

//C++ Builder

void __fastcall TfmMain::chbMultiSelectClick(TObject *Sender)

{

    switch (((TCheckBox*)Sender)->Tag) {

// Enables/disables the MultiSelect option

      case 0 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsBehavior = (MasterView->OptionsBehavior + TdxMasterViewOptionsBehavior()) << mobMultiSelect;

        else

          MasterView->OptionsBehavior = (MasterView->OptionsBehavior + TdxMasterViewOptionsBehavior()) >> mobMultiSelect; break;

// Enables/disables the UseIndent option

      case 1 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsBehavior = (MasterView->OptionsBehavior + TdxMasterViewOptionsBehavior()) << mobUseIndent;

        else

          MasterView->OptionsBehavior = (MasterView->OptionsBehavior + TdxMasterViewOptionsBehavior()) >> mobUseIndent; break;

// Enables/disables the Animation option

      case 2 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movAnimation;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movAnimation; break;

// Enables/disables the AutoColumnWidth option

      case 3 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movAutoColumnWidth;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movAutoColumnWidth; break;

// Enables/disables the DrawEndEllipsis option

      case 4 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movDrawEndEllipsis;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movDrawEndEllipsis; break;

// Enables/disables the HideFocusRect option

      case 5 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movHideFocusRect;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movHideFocusRect; break;

// Enables/disables the HideSelection option

      case 6 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movHideSelection;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movHideSelection; break;

// Enables/disables the KeepColumnWidth option

      case 7 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movKeepColumnWidths;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movKeepColumnWidths; break;

// Enables/disables the TransparentDragAndDrop option

      case 8 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movTransparentDragAndDrop;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movTransparentDragAndDrop; break;

// Enables/disables the UseBitmap option

      case 9 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movUseBitmap;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movUseBitmap; break;

// Enables/disables the UseBitmapToDrawPreview option

     case 10 : if (((TCheckBox*)Sender)->Checked)

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) << movUseBitmapToDrawPreview;

        else

          MasterView->OptionsView = (MasterView->OptionsView + TdxMasterViewOptionsView()) >> movUseBitmapToDrawPreview;

  };

}


MasterView Level Options Example

This example demonstrates how to enable/disable options of a specific level in the ExpressMasterView at runtime.

//Delphi

procedure TfmMain.chbDblClkExpandingClick(Sender: TObject);

begin

  with CurrentLevel, TCheckBox(Sender) do begin

    case TCheckBox(Sender).Tag of

// Enables/disables the DblClkExpanding option

    0 : if Checked then

          OptionsBehavior := OptionsBehavior + [lobDblClkExpanding]

        else

          OptionsBehavior := OptionsBehavior - [lobDblClkExpanding];

// Enables/disables the ColumnMoving option

    1 : if Checked then

          OptionsCustomize := OptionsCustomize + [locColumnMoving]

        else

          OptionsCustomize := OptionsCustomize - [locColumnMoving];

// Enables/disables the ColumnHiding option

    2 : if Checked then

          OptionsCustomize := OptionsCustomize + [locColumnHiding]

        else

          OptionsCustomize := OptionsCustomize - [locColumnHiding];

// Enables/disables the ColumnHorSizing option

    3 : if Checked then

          OptionsCustomize := OptionsCustomize + [locColumnHorSizing]

        else

          OptionsCustomize := OptionsCustomize - [locColumnHorSizing];

// Enables/disables the ColumnVerSizing option

    4 : if Checked then

          OptionsCustomize := OptionsCustomize + [locColumnVerSizing]

        else

          OptionsCustomize := OptionsCustomize - [locColumnVerSizing];

// Enables/disables the ColumnSorting option

    5 : if Checked then

          OptionsCustomize := OptionsCustomize + [locColumnSorting]

        else

          OptionsCustomize := OptionsCustomize - [locColumnSorting];

// Enables/disables the ColumnGrouping option

    6 : if Checked then

          OptionsCustomize := OptionsCustomize + [locColumnGrouping]

        else

          OptionsCustomize := OptionsCustomize - [locColumnGrouping];

// Enables/disables the HideColumnOnGrouping option

    7 : if Checked then

          OptionsCustomize := OptionsCustomize + [locHideColumnOnGrouping]

        else

          OptionsCustomize := OptionsCustomize - [locHideColumnOnGrouping];

// Enables/disables the ShowColumnOnUngrouping option

    8 : if Checked then

          OptionsCustomize := OptionsCustomize + [locShowColumnOnUngrouping]

        else

          OptionsCustomize := OptionsCustomize - [locShowColumnOnUngrouping];

// Enables/disables the SmartLoad option

    9 : if Checked then

          OptionsDB := OptionsDB + [lodSmartLoad]

        else

          OptionsDB := OptionsDB - [lodSmartLoad];

// Enables/disables the SmartRefresh option

    10 : if Checked then

          OptionsDB := OptionsDB + [lodSmartRefresh]

        else

          OptionsDB := OptionsDB - [lodSmartRefresh];

// Enables/disables the SmartReload option

    11 : if Checked then

          OptionsDB := OptionsDB + [lodSmartReload]

        else

          OptionsDB := OptionsDB - [lodSmartReload];

// Enables/disables the Caption option

    12 : if Checked then

          OptionsView := OptionsView + [lovCaption]

        else

          OptionsView := OptionsView - [lovCaption];

// Enables/disables the Footer option

    13 : if Checked then

          OptionsView := OptionsView + [lovFooter]

        else

          OptionsView := OptionsView - [lovFooter];

// Enables/disables the Grid option

    14 : if Checked then

          OptionsView := OptionsView + [lovGrid]

        else

          OptionsView := OptionsView - [lovGrid];

// Enables/disables the GridWithPreview option

    15 : if Checked then

          OptionsView := OptionsView + [lovGridWithPreview]

        else

          OptionsView := OptionsView - [lovGridWithPreview];

// Enables/disables the GroupByBox option

    16 : if Checked then

          OptionsView := OptionsView + [lovGroupByBox]

        else

          OptionsView := OptionsView - [lovGroupByBox];

// Enables/disables the Header option

    17 : if Checked then

          OptionsView := OptionsView + [lovHeader]

        else

          OptionsView := OptionsView - [lovHeader];

// Enables/disables the OccupyRestSpace option

    18 : if Checked then

          OptionsView := OptionsView + [lovOccupyRestSpace]

        else

          OptionsView := OptionsView - [lovOccupyRestSpace];

// Enables/disables the Preview option

    19 : if Checked then

          OptionsView := OptionsView + [lovPreview]

        else

          OptionsView := OptionsView - [lovPreview];

    end;

  end;

end;

//C++ Builder

void __fastcall TfmMain::chbDblClkExpandingClick(TObject *Sender)

{

    switch (((TCheckBox*)Sender)->Tag) {

// Enables/disables the DblClkExpanding option

case 0 : if (((TCheckBox*)Sender)->Checked)

                 CurrentLevel->OptionsBehavior = (CurrentLevel->OptionsBehavior + TdxMasterViewLevelOptionsBehavior()) << lobDblClkExpanding;

               else

                 CurrentLevel->OptionsBehavior = (CurrentLevel->OptionsBehavior + TdxMasterViewLevelOptionsBehavior()) >> lobDblClkExpanding; break;

// Enables/disables the ColumnMoving option

      case 1 : if (((TCheckBox*)Sender)->Checked)

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) << locColumnMoving;

               else

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locColumnMoving; break;

// Enables/disables the ColumnHiding option

      case 2 : if (((TCheckBox*)Sender)->Checked)

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locColumnHiding;

               else

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locColumnHiding; break;

// Enables/disables the ColumnHorSizing option

      case 3 : if (((TCheckBox*)Sender)->Checked)

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) << locColumnHorSizing;

               else

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locColumnHorSizing; break;

// Enables/disables the ColumnVerSizing option

      case 4 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) << locColumnVerSizing;

               else

                  CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locColumnVerSizing; break;

// Enables/disables the ColumnSorting option

      case 5 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) << locColumnSorting;

               else

                  CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locColumnSorting;  break;

// Enables/disables the ColumnGrouping option

      case 6 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) << locColumnGrouping;

               else

                  CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locColumnGrouping; break;

// Enables/disables the HideColumnOnGrouping option

      case 7 : if (((TCheckBox*)Sender)->Checked)

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) << locHideColumnOnGrouping;

               else

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locHideColumnOnGrouping; break;

// Enables/disables the ShowColumnOnUngrouping option

      case 8 : if (((TCheckBox*)Sender)->Checked)

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) << locShowColumnOnUngrouping;

               else

                 CurrentLevel->OptionsCustomize = (CurrentLevel->OptionsCustomize + TdxMasterViewLevelOptionsCustomize()) >> locShowColumnOnUngrouping; break;

// Enables/disables the SmartLoad option

      case 9 : if (((TCheckBox*)Sender)->Checked)

                 CurrentLevel->OptionsDB = (CurrentLevel->OptionsDB + TdxMasterViewLevelOptionsDB()) << lodSmartLoad;

                else

                 CurrentLevel->OptionsDB = (CurrentLevel->OptionsDB + TdxMasterViewLevelOptionsDB()) >> lodSmartLoad; break;

// Enables/disables the SmartRefresh option

      case 10 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsDB = (CurrentLevel->OptionsDB + TdxMasterViewLevelOptionsDB()) << lodSmartRefresh;

                else

                  CurrentLevel->OptionsDB = (CurrentLevel->OptionsDB + TdxMasterViewLevelOptionsDB()) >> lodSmartRefresh; break;

// Enables/disables the SmartReload option

      case 11 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsDB = (CurrentLevel->OptionsDB + TdxMasterViewLevelOptionsDB()) << lodSmartReload;

                else

                  CurrentLevel->OptionsDB = (CurrentLevel->OptionsDB + TdxMasterViewLevelOptionsDB()) >> lodSmartReload; break;

// Enables/disables the Caption option

      case 12 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) << lovCaption;

                else

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) >> lovCaption; break;

// Enables/disables the Footer option

      case 13 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) << lovFooter;

                else

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) >> lovFooter; break;

// Enables/disables the Grid option

      case 14 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) << lovGrid;

                else

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) >> lovGrid; break;

// Enables/disables the GridWithPreview option

      case 15 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) << lovGridWithPreview;

                else

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) >> lovGridWithPreview; break;

// Enables/disables the GroupByBox option

      case 16 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) << lovGroupByBox;

                else

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) >> lovGroupByBox; break;

// Enables/disables the Header option

      case 17 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) << lovHeader;

                else

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) >> lovHeader; break;

// Enables/disables the OccupyRestSpace option

      case 18 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) << lovOccupyRestSpace;

                else

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) >> lovOccupyRestSpace; break;

// Enables/disables the Preview option

      case 19 : if (((TCheckBox*)Sender)->Checked)

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) << lovPreview;

                else

                  CurrentLevel->OptionsView = (CurrentLevel->OptionsView + TdxMasterViewLevelOptionsView()) >> lovPreview;

  };

}


MasterView Column Options Example

This example illustrates how to enable/disable options of a specific column in the ExpressMasterView at runtime.

//Delphi

procedure TfmMain.chbGroupingClick(Sender: TObject);

begin

  with CurrentColumn, TCheckBox(Sender) do begin

    case TCheckBox(Sender).Tag of

// Enables/disables the Grouping option

    0 : if Checked then

          Options := Options + [coGrouping]

        else

          Options := Options - [coGrouping];

// Enables/disables the Hidden option

    1 : if Checked then

          Options := Options + [coHidden]

        else

          Options := Options - [coHidden];

// Enables/disables the HorSizing option

    2 : if Checked then

          Options := Options + [coHorSizing]

        else

          Options := Options - [coHorSizing];

// Enables/disables the Moving option

    3 : if Checked then

          Options := Options + [coMoving]

        else

          Options := Options - [coMoving];

// Enables/disables the Sorting option

    4 : if Checked then

          Options := Options + [coSorting]

        else

          Options := Options - [coSorting];

// Enables/disables the VerSizing option

    5 : if Checked then

          Options := Options + [coVerSizing]

        else

          Options := Options - [coVerSizing];

    end;

  end;

end;

//C++ Builder

void __fastcall TfmMain::chbGroupingClick(TObject *Sender)

{

    switch (((TCheckBox*)Sender)->Tag) {

// Enables/disables the Grouping option

      case 0 : if (((TCheckBox*)Sender)->Checked)

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) << coGrouping;

        else

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) >> coGrouping; break;

// Enables/disables the Hidden option

      case 1 : if (((TCheckBox*)Sender)->Checked)

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) << coHidden;

        else

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) >> coHidden; break;

// Enables/disables the HorSizing option

      case 2 : if (((TCheckBox*)Sender)->Checked)

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) << coHorSizing;

        else

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) >> coHorSizing; break;

// Enables/disables the Moving option

      case 3 : if (((TCheckBox*)Sender)->Checked)

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) << coMoving;

        else

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) >> coMoving; break;

// Enables/disables the Sorting option

      case 4 : if (((TCheckBox*)Sender)->Checked)

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) << coSorting;

        else

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) >> coSorting; break;

// Enables/disables the VerSizing option

      case 5 : if (((TCheckBox*)Sender)->Checked)

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) << coVerSizing;

        else

          CurrentColumn->Options = (CurrentColumn->Options + TdxMasterViewColumnOptions()) >> coVerSizing; break;

    };

}


OnFilterRecord Example

This example demonstrates how to implement a filter to load records in the ExpressMasterView.

//Delphi

procedure TfmMain.lvlProductsFilterRecord(Sender: TdxMasterViewLevel;

  const AID, AKeyValue: Variant; var Accept: Boolean);

begin

  //load only the root level's records

  Accept := Sender.DataSet.FieldByName('Pr_Parent').AsInteger = -1;

end;

//C++ Builder

void __fastcall TfmMain::lvlProductsFilterRecord(

      TdxMasterViewLevel *Sender, const Variant &AID,

      const Variant &AKeyValue, bool &Accept)

{

  //load only the root level's records

  Accept = Sender->DataSet->FieldByName("Pr_Parent")->AsInteger == -1;

}


How To Get Support

The goal of our support team is to answer and alleviate any problems you might encounter when using our components.  Feel free to contact us at:

E-mail:

support@devexpress.com

You can address any suggestions, comments, complaints or good thoughts to:

suggest@devexpress.com

Visit the ExpressSupportForum at http://www.devexpress.com/dxforum to find articles on our components, tips and tricks, and a myriad of working samples with full source code.