The
Items object contains a collection of items. Each item is identified by a
handle HITEM. The HITEM is of long type. Each item contains a collection of
cells. The number of cells is determined by the number of Column objects in
the control. To access the Items collection use Items property of the control.
Using the Items collection you can add, remove or change the control items.
The Items collection can be organized as a hierarchy or as a tabular data. The
Items collection supports the following properties and methods:
| | Name | Description | |
| | AcceptSetParent | Verifies whether the item can be child of another item. | |
| | AddItem | Adds a new item, and returns a handle to the newly created item. | |
| | CellBackColor | Retrieves or sets the cell's background color. | |
| | CellBold | Retrieves or sets a value that specifies whether the cell should appear in bold. | |
| | CellButtonAutoWidth | Retrieves or sets a value indicating whether the cell's button fits the cell's caption. | |
| | CellCaption | Gets the cell's display value. | |
| | CellChecked | Retrieves the cell's handle that is checked giving the radio group identifier. | |
| | CellData | Specifies the cell's extra data. | |
| | CellEnabled | Returns or sets a value that determines whether a cell can respond to user-generated events. | |
| | CellFont | Retrieves or sets the cell's font. | |
| | CellForeColor | Retrieves or sets the cell's foreground color. | |
| | CellFormatLevel | Specifies the arrangement of the fields inside the cell. | |
| | CellHAlignment | Retrieves or sets a value that indicates the alignment of the cell's caption. | |
| | CellHasButton | Retrieves or sets a value indicating whether the cell has associated a push button. | |
| | CellHasCheckBox | Retrieves or sets a value indicating whether the cell has associated a checkbox. | |
| | CellHasRadioButton | Retrieves or sets a value indicating whether the cell has associated a radio button. | |
| | CellHyperLink | Specifies whether the cell's is highlighted when the cursor mouse is over the cell. | |
| | CellImage | Retrieves or sets a value that indicates the index of icon in the cell. | |
| | CellImages | Specifies an additional list of icons shown in the cell. | |
| | CellItalic | Retrieves or sets a value that specifies whether the cell should appear in italic. | |
| | CellItem | Retrieves the handle of item that is the owner of a specfic cell. | |
| | CellMerge | Retrieves or sets a value that indicates the index of the cell that's merged to. | |
| | CellParent | Retrieves the parent of an inner cell. | |
| | CellPicture | Retrieves or sets the cell's picture. | |
| | CellPictureHeight | Retrieves or sets a value that indicates the height of the cell's picture. | |
| | CellPictureWidth | Retrieves or sets a value that indicates the width of the cell's picture. | |
| | CellRadioGroup | Retrieves or sets a value indicating the radio group where the cell is contained. | |
| | CellSingleLine | Retrieves or sets a value indicating whether the cell's caption is painted using one or more lines. | |
| | CellSortData | Specifies the cell's sort data. | |
| | CellState | Retrieves or sets the cell's state. Has effect only for check and radio cells. | |
| | CellStrikeOut | Retrieves or sets a value that specifies whether the cell should appear in strikeout. | |
| | CellToolTip | Retrieves or sets a value that indicates the cell's too tip | |
| | CellUnderline | Retrieves or sets a value that specifies whether the cell should appear in underline. | |
| | CellVAlignment | Retrieves or sets a value that indicates how the cell's caption is vertically aligned. | |
| | CellValue | Specifies the cell's value. | |
| | CellValueFormat | Specifies how the cell's caption is displayed. | |
| | CellWidth | Retrieves or sets a value that indicates the width of the inner cell. | |
| | ChildCount | Retrieves the number of children items. | |
| | ClearCellBackColor | Clears the cell's background color. | |
| | ClearCellForeColor | Clears the cell's foreground color. | |
| | ClearCellHAlignment | Clears the cell's alignment. | |
| | ClearItemBackColor | Clears the item's background color. | |
| | ClearItemForeColor | Clears the item's foreground color. | |
| | ComputeValue | Computes the value of a specified formula. | |
| | DefaultItem | Retrieves or sets a value that indicates the handle of the item used by Items properties in VFP. | |
| | EnableItem | Returns or sets a value that determines whether a item can respond to user-generated events. | |
| | EnsureVisibleItem | Ensures the given item is in the visible client area. | |
| | ExpandItem | Expands, or collapses, the child items of the specified item. | |
| | FindItem | Finds an item, looking for Value in ColIndex colum. The searching starts at StartIndex item. | |
| | FindItemData | Finds the item giving its data. | |
| | FindPath | Finds the item, given its path. The control searches the path on the SearchColumnIndex column. | |
| | FirstVisibleItem | Retrieves the handle of the first visible item in the control. | |
| | FocusItem | Retrieves the handle of item that has the focus. | |
| | FormatCell | Specifies the custom format to display the cell's content. | |
| | FullPath | Returns the fully qualified path of the referenced item in the ExGrid control. The value is taken from the column SearchColumnIndex. | |
| | GroupItem | Indicates a group item if positive, and the value specifies the index of the column that has been grouped. | |
| | InnerCell | Retrieves the inner cell. | |
| | InsertControlItem | Inserts a new item of ActiveX type, and returns a handle to the newly created item. | |
| | InsertItem | Inserts a new item, and returns a handle to the newly created item. | |
| | InsertObjectItem | Inserts a new item that hosts the giving object, and returns a handle to the newly created item. | |
| | IsItemLocked | Returns a value that indicates whether the item is locked or unlocked. | |
| | IsItemVisible | Checks if the specific item is in the visible client area. | |
| | ItemAllowSizing | Retrieves or sets a value that indicates whether a user can resize the item at run-time. | |
| | ItemAppearance | Specifies the item's appearance when the item hosts an ActiveX control. | |
| | ItemBackColor | Retrieves or sets a background color for a specific item. | |
| | ItemBold | Retrieves or sets a value that indicates whether the item should appear in bold. | |
| | ItemByIndex | Retrieves the handle of the item given its index in Items collection.. | |
| | ItemCell | Retrieves the cell's handle given the item and the column. | |
| | ItemChild | Retrieves the child of a specified item. | |
| | ItemControlID | Retrieves the item's control identifier that was used by InsertControlItem. | |
| | ItemCount | Retrieves the number of items. | |
| | ItemData | Retrieves or sets the extra data for a specific item. | |
| | ItemDivider | Specifies whether the item acts like a divider item. The value indicates the index of column used to define the divider's title. | |
| | ItemDividerLine | Defines the type of line in the divider item. | |
| | ItemDividerLineAlignment | Specifies the alignment of the line in the divider item. | |
| | ItemFiltered | Checks whether the item is included in the control's filter. | |
| | ItemFont | Retrieves or sets the item's font. | |
| | ItemForeColor | Retrieves or sets a foreground color for a specific item. | |
| | ItemHasChildren | Adds an expand button to left side of the item even if the item has no child items. | |
| | ItemHeight | Retrieves or sets the item's height. | |
| | ItemItalic | Retrieves or sets a value that indicates whether the item should appear in italic. | |
| | ItemMaxHeight | Retrieves or sets a value that indicates the maximum height when the item's height is variable. | |
| | ItemMinHeight | Retrieves or sets a value that indicates the minimum height when the item's height is sizing. | |
| | ItemObject | Retrieves the ActiveX object associated, if the item was created using the InsertControlItem method. | |
| | ItemParent | Returns the handle of the item's parent item. | |
| | ItemPosition | Retrieves or sets a value that indicates the item's position in the children list. | |
| | ItemStrikeOut | Retrieves or sets a value that indicates whether the item should appear in strikeout. | |
| | ItemToIndex | Retrieves the index of item in the Items collection given its handle. | |
| | ItemUnderline | Retrieves or sets a value that indicates whether the item should appear in underline. | |
| | ItemWidth | Retrieves or sets a value that indicates the item's width while it contains an ActiveX control. | |
| | ItemWindowHost | Retrieves the window's handle that hosts an ActiveX control when the item was created using the InsertControlItem method. | |
| | ItemWindowHostCreateStyle | Retrieves or sets a value that indicates a combination of window styles used to create the ActiveX window host. | |
| | LastVisibleItem | Retrieves the handle of the last visible item. | |
| | LockedItem | Retrieves the handle of the locked item. | |
| | LockedItemCount | Specifies the number of items fixed on the top or bottom side of the control. | |
| | MatchItemCount | Retrieves the number of items that match the filter. | |
| | MergeCells | Merges a list of cells. | |
| | NextSiblingItem | Retrieves the next sibling of the item in the parent's child list. | |
| | NextVisibleItem | Retrieves the handle of next visible item. | |
| | PathSeparator | Returns or sets the delimiter character used for the path returned by the FullPath property. | |
| | PrevSiblingItem | Retrieves the previous sibling of the item in the parent's child list. | |
| | PrevVisibleItem | Retrieves the handle of previous visible item. | |
| | RemoveAllItems | Removes all items from the control. | |
| | RemoveItem | Removes a specific item. | |
| | RemoveSelection | Removes the selected items (including the descendents). | |
| | RootCount | Retrieves the number of root objects in the Items collection. | |
| | RootItem | Retrieves the handle of the root item giving its index in the root items collection. | |
| | SelectableItem | Specifies whether the user can select the item. | |
| | SelectAll | Selects all items. | |
| | SelectCount | Retrieves the handle of selected item giving its index in selected items collection. | |
| | SelectedItem | Retrieves the selected item's handle given its index in selected items collection. | |
| | Selection | Selects items by index. | |
| | SelectItem | Selects or unselects a specific item. | |
| | SelectPos | Selects items by position. | |
| | SetParent | Changes the parent of the given item. | |
| | SortableItem | Specifies whether the item is sortable. | |
| | SortChildren | Sorts the child items of the given parent item in the control. SortChildren will not recurse through the grid, only the immediate children of Item will be sorted. | |
| | SplitCell | Splits a cell, and returns the inner created cell. | |
| | UnmergeCells | Unmerges a list of cells. | |
| | UnselectAll | Unselects all items. | |
| | UnsplitCell | Unsplits a cell. | |
| | VisibleCount | Retrieves the number of visible items. | |
| | VisibleItemCount | Retrieves the number of visible items. | |