All of the properties, events, and methods for the VSFlexGrid control are listed in the following tables. Properties, events, and methods that apply only to this control, or that require special consideration when used with it, are marked with an asterisk (*). These are documented in later sections. For documentation on the remaining properties, see the Visual Basic documentation.
Properties
Gets or sets the description of the control used by accessibility client applications. | |
Gets or sets the name of the control used by accessibility client applications. | |
Gets or sets the role of the control used by accessibility client applications. | |
Gets or sets the value of the control used by accessibility client applications. | |
Returns an aggregate function (sum, average, and so on) for a given range. | |
Returns or sets a value that determines where an object is displayed on a form. | |
Returns or sets whether clicking on the fixed area will select entire columns and rows. | |
Returns or sets whether the user can select ranges of cells with the mouse and keyboard. | |
Returns or sets whether the user is allowed to freeze rows and columns with the mouse. | |
Returns or sets whether the user is allowed to resize rows and columns with the mouse. | |
Returns or sets the paint style of the control on an MDIForm or Form object. | |
Returns information from a VSFlex archive file. | |
Returns or sets whether column widths will be automatically adjusted when data is loaded. | |
Returns or sets whether the control will search for entries as they are typed. | |
Returns or sets the delay, in seconds, before the AutoSearch buffer is reset. | |
Returns or sets whether AutoSize will adjust column widths or row heights to fit cell contents. | |
Returns or sets whether columns should be resized to fit when the user double-clicks on the header row. | |
Returns or sets the background color of the non-fixed cells. | |
Returns or sets the background color for alternate rows (set to 0 to disable). | |
Returns or sets the background color of the area not covered by any cells. | |
Returns or sets the background color of the fixed rows and columns. | |
Returns or sets the background color of the frozen rows and columns. | |
Returns or sets the background color of the selected cells. | |
Returns the Bookmark associated with a given row when the grid is bound to an ADO recordset (read-only). | |
Returns or sets the border style for the control. | |
Returns the zero-based index of the last row displayed in the control. | |
Returns or sets whether validation occurs on the control which lost focus. | |
*Cell |
Returns or sets cell properties for an arbitrary range. |
Returns or sets the alignment of text in the selected cell or range. | |
Returns or sets the background color of the selected cell or range. | |
Returns or sets the picture used in cell buttons. | |
Returns or sets whether a grid cell has a check mark in it. | |
Returns or sets the color to be used for flooding a cell. | |
Returns or sets the percentage of flooding for a cell. | |
Returns or sets the Bold attribute of the font of the selected cell or range. | |
Returns or sets the Italic attribute of the font of the selected cell or range. | |
Returns or sets the name of the font of the selected cell or range. | |
Returns or sets the size of the font of the selected cell or range. | |
Returns or sets the Strikethru attribute of the font of the selected cell or range. | |
Returns or sets the Underline attribute of the font of the selected cell or range. | |
Returns or sets the width of the font of the selected cell or range. | |
Returns or sets the foreground color of the selected cell or range. | |
Returns the height of the selected cell, in twips. Also brings the cell into view, scrolling if necessary. | |
Returns the left (x) coordinate of the selected cell relative to the control, in twips. Also brings the cell into view, scrolling if necessary. | |
Returns or sets the picture displayed in a selected cell or range. | |
Returns or sets the alignment of the pictures in the selected cell or range. | |
Returns or sets 3D effects for text in a selected cell or range. | |
Returns the top (y) coordinate of the selected cell relative to the control, in twips. Also brings the cell into view, scrolling if necessary. | |
Returns the width of the selected cell, in twips. Also brings the cell into view, scrolling if necessary. | |
Returns the height of the control's client area, in twips. | |
Returns the width of the control's client area, in twips. | |
*Clip |
Returns or sets the contents of a range. |
Returns or sets the characters to be used as column and row separators in Clip strings. | |
*Col |
Returns or sets the zero-based index of the current column. |
Returns or sets the alignment of the given column. | |
Returns or sets the list to be used as a drop-down on the specified column. | |
Returns or sets a user-defined variant associated with the given column. | |
Returns or sets the data type for the column. | |
Returns or sets the input mask used to edit cells on the specified column. | |
Returns or sets the format used to display numeric values. | |
Returns or sets whether a column is hidden. | |
Sets or returns a handle to an ImageList to be used as a source of pictures for a given column. | |
Returns or sets the indentation of the given column, in twips. | |
Returns the column index that matches the given key. | |
Returns whether a given column is currently within view. | |
Returns or sets a key used to identify the given column. | |
Returns the left (x) coordinate of a column relative to the edge of the control, in twips. | |
Moves a given column to a new position. | |
*Cols |
Returns or sets the total number of columns in the control. |
Returns or sets the extent of a range of columns. | |
Returns or sets the sorting order for each column (for use with the Sort property). | |
Returns or sets the width of the specified column in twips. | |
Returns or sets the maximum column width, in twips. | |
Returns or sets the minimum column width, in twips. | |
Returns the number of items in the editor's combo list. | |
Returns the long value associated with an item in the editor's combo list. | |
Returns or sets the zero-based index of the current selection in the editor's combo list. | |
Returns the string associated with an item in the editor's combo list. | |
Returns or sets the list to be used as a drop-down when editing a cell. | |
Returns or sets whether combo lists should support smart searches. | |
Returns or sets a DataBindings collection object that collects the bindable properties that are available to the developer (read-only). | |
Returns or sets the data member. | |
Returns or sets the type of data binding used by the control when it is connected to a data source (read-only or read/write). | |
Returns or sets the data source. | |
Returns or sets a value that determines whether manual or automatic drag mode is used. | |
Returns or sets whether the control allows in-cell editing. | |
Returns or sets the input mask used to edit cells. | |
Returns or sets the maximum number of characters that can be entered in the editor. | |
Returns or the number of characters selected in the editor. | |
Returns or sets the starting point of text selected in the editor. | |
Returns or sets the string containing the current selection in the editor. | |
Returns or sets the text in the cell editor. | |
Returns a handle to the grid's editing window, or 0 if the grid is not in edit mode. | |
Returns or sets whether the control will display ellipsis (...) after long strings. | |
Enabled |
Returns or sets a value that determines whether a form or control can respond to user-generated events. See the Visual Basic documentation for more information. |
Returns or sets whether column headers are used to sort and/or move columns. | |
Returns or sets whether the last column should be adjusted to fit the control's width. | |
Returns or sets whether changes to the Text or Format properties apply to the current cell or to the entire selection. | |
Returns the index of a row that contains a specified string or RowData value. | |
Returns the index of the row that contains a match or -1 if no match was found. | |
Returns or sets the alignment for the fixed rows in a column. | |
Returns or sets the number of fixed (non-scrollable) columns. | |
Returns or sets the number of fixed (non-scrollable) rows. | |
Gets or sets flags that affect the behavior of the control. | |
Returns or sets a custom data source for the control. | |
Returns or sets the color used to flood cells. | |
Returns or sets the type of focus rectangle to be displayed around the current cell. | |
Font |
Returns a Font object. See the Visual Basic documentation for more information. |
Determines whether the font is bold. | |
Determines whether the font is italicized. | |
Returns or sets the name of the font. | |
Determines the size of the font. | |
Determines the strikethru of the font. | |
Determines the font is underlined. | |
Returns or sets the width of the font, in points. | |
Returns or sets the foreground color of the non-fixed cells. | |
Returns or sets the foreground color of the fixed rows and columns. | |
Returns or sets the foreground color of the frozen rows and columns. | |
Returns or sets the foreground color of the selected cells. | |
Assigns column widths, alignments, and fixed row and column text. | |
Returns or sets the number of frozen (editable but non-scrollable) columns. | |
Returns or sets the number of frozen (editable but non-scrollable) rows. | |
Returns or sets the color used to draw the grid lines between the non-fixed cells. | |
Returns or sets the color used to draw the grid lines between the fixed cells. | |
Returns or sets the type of lines to be drawn between non-fixed cells. | |
Returns or sets the type of lines to be drawn between fixed cells. | |
Returns or sets the width of the grid lines, in pixels. | |
Returns or sets the type of comparison used when grouping cells. | |
Specifies the default Help file context ID for an object. | |
Returns or sets whether selected cells will be highlighted. | |
hWnd |
Returns a handle to a form or control. See the Visual Basic documentation for more information. |
Returns or sets whether an outline row is collapsed or expanded. | |
Returns a value that indicates whether the grid is in search mode. | |
Returns or sets whether a row is selected (for listbox-type selections). | |
Returns or sets whether a row contains subtotals (as opposed to data). | |
Returns or sets the zero-based index of the leftmost non-fixed column displayed in the control. | |
Returns or sets whether cells with the same contents will be merged into a single cell. | |
Allows users to set different merging criteria for fixed vs. scrollable cells. | |
Returns or sets whether a column will have its cells merged. | |
Returns or sets the type of comparison used when merging cells. | |
Returns or sets whether a row will have its cells merged. | |
Returns the zero-based index of the column under the mouse pointer. | |
MouseIcon |
Returns or sets a custom mouse icon. See the Visual Basic documentation for more information. |
MousePointer |
Returns or sets a value indicating the type of mouse pointer displayed when the mouse is over a particular part of an object at run time. See the Visual Basic documentation for more information. |
Returns the zero-based index of the row under the mouse pointer. | |
Returns or sets whether subtotals will be displayed in a single row when possible. | |
Returns or sets the picture to be used for closed outline nodes. | |
Returns or sets the picture to be used for open outline nodes. | |
Returns or sets whether the control can act as an OLE drag source, either automatically or under program control. | |
Returns or sets whether the control can act as an OLE drop target, either automatically or under program control. | |
Returns or sets the type of outline bar that should be displayed. | |
Returns or sets the column used to display the outline tree. | |
Returns or sets whether and when the control will fire the DrawCell event. | |
Returns a picture of the entire control. | |
Returns or sets whether text and pictures should be overlaid in cells. | |
Returns or sets the type of picture returned by the Picture property. | |
Enables or disables redrawing of the VSFlexGrid control. | |
Returns the zero-based index of the last column displayed in the control. | |
Returns or sets whether text should be displayed from right to left on Hebrew and Arabic systems. | |
*Row |
Returns or sets the zero-based index of the current row. |
Returns or sets a user-defined variant associated with the given row. | |
Returns or sets the height of the specified row in twips. | |
Returns or sets the maximum row height, in twips. | |
Returns or sets the minimum row height, in twips. | |
Returns or sets whether a row is hidden. | |
Returns whether a given row is currently within view. | |
Returns or sets the outline level for a subtotal row. | |
Returns the top (y) coordinate of a row relative to the edge of the control, in twips. | |
Moves a given row to a new position. | |
*Rows |
Returns or sets the total number of rows in the control. |
Returns or sets the extent of a range of rows. | |
Returns or sets a value that indicates whether a row has been added, deleted, or modified. | |
Returns or sets whether the control will display horizontal or vertical scroll bars. | |
Returns or sets whether ToolTips are shown while the user scrolls vertically. | |
Returns or sets the ToolTip text shown while the user scrolls vertically. | |
Returns or sets scrolling should occur while the user moves the scroll thumb. | |
Returns the position of a selected row when SelectionMode is set to flexSelectionListBox. | |
Returns the number of selected rows when SelectionMode is set to flexSelectionListBox. | |
Returns or sets whether the control will select cells in a free range, by row, by column, or like a listbox. | |
Returns or sets the color used to draw the border around the sheet. | |
Returns or sets whether drop-down buttons are shown when editable cells are selected. | |
*Sort |
Sets a sorting order for the selected rows using the selected columns as keys. |
Gets or sets a custom image to indicate the column sort direction. | |
Gets or sets a custom image to indicate the column sort direction. | |
Returns or sets whether subtotals should be inserted above or below the totaled data. | |
Returns or sets whether the TAB key will move focus between controls (VB default) or between grid cells. | |
Returns or sets the tab order of an object within its parent form. | |
Returns or sets a value indicating whether a user can use the TAB key to give focus to an object. | |
*Tag |
Stores any extra data needed for your program. |
*Text |
Returns or sets the contents of the selected cell or range. |
Returns or sets the contents of a cell identified by a single index. | |
Returns or sets the contents of a cell identified by its row and column coordinates. | |
Returns or sets 3D effects for displaying text in non-fixed cells. | |
Returns or sets 3D effects for displaying text in fixed cells. | |
Returns or sets the text displayed when the mouse is paused over the control. | |
Returns or sets the zero-based index of the topmost non-fixed row displayed in the control. | |
Returns or sets the color used to draw the outline tree. | |
Returns the numeric value of the current cell. | |
Returns the numeric value of a cell identified by its row and column coordinates. | |
Returns the version of the control currently loaded in memory. | |
Returns or sets whether all data is fetched from the data source at once or as needed. | |
Returns or sets a picture to be used as a background for the control's scrollable area. | |
Returns or sets the alignment of the WallPaper background picture. | |
Returns or sets whether text wider that its cell will wrap. |
Methods
Adds a row to the control. | |
Adds, extracts, or deletes files from a vsFlexGrid archive file. | |
Resizes column widths or row heights to fit cell contents. | |
Binds the grid to an array of variants to be used as storage. | |
Returns a ColComboList string from data in a recordset. | |
Draws a border around and within the selected cells. | |
Similar to the CellBorder method, but allows the user to specify the range instead of using the selection CellBorderRange. | |
Clears the contents of the control. Optional parameters specify what to clear and where. | |
*Copy |
Copy selection to the Clipboard. |
*Cut |
Cut selection to the Clipboard. |
Forces the control to re-fetch all data from its data source. | |
Deletes the selection. | |
*Drag |
Begins, ends, or cancels a drag operation of any object, except Line, Menu, Shape, and Timer. |
Starts dragging a row to a new position. | |
Activates edit mode. | |
Finishes any pending edits and returns the grid to browse mode. | |
Returns the range of merged cells that includes a given cell. | |
Returns an outline node object for a given subtotal row. | |
Returns the number of a row's parent, first, or last child in an outline. | |
Returns the current selection ordered so that Row1 <= Row2 and Col1 <= Col2. | |
Loads the control with data from a Variant array or from another FlexGrid control. | |
Loads grid contents and format from a file. | |
Loads grid contents and format from a URL (created with SaveGrid). | |
Initiates an OLE drag operation. | |
Sets an outline level for displaying subtotals. | |
Pastes the selection from the Clipboard. | |
Prints the grid on the printer. | |
Refresh |
Forces a complete repaint of a form or control. See the Visual Basic documentation for more information. |
Removes a row from the control. | |
Saves grid contents and format to a file. | |
Selects a range of cells. | |
Inserts rows with summary data. |
Fired after the user expands or collapses one or more rows in an outline. | |
Fired after a column is moved by dragging on the ExplorerBar. | |
Fired after a row is moved by dragging on the ExplorerBar or using the DragRow method. | |
Fired after the current cell (Row, Col) changes to a different cell. | |
Fired after a column is sorted by a click on the ExplorerBar. | |
Fired after the user changes the number of frozen rows or columns. | |
Fired before the user expands or collapses one or more rows in an outline. | |
Fired before a column is moved by dragging on the ExplorerBar. | |
Fired before a row is moved by dragging on the ExplorerBar or using the DragRow method. | |
Fired before the current cell (Row, Col) changes to a different cell. | |
Fired before a scroll tip is shown so you can set the ScrollTipText property. | |
Fired before a column is sorted by a click on the ExplorerBar. | |
Fired before the user starts resizing a row or column, allows cancel. | |
This event occurs when a user presses and then releases the button of mouse device over an object. See the Visual Basic documentation for more information. | |
Fired when the Sort property is set to flexSortCustom, to allow custom comparison of rows. | |
Fired when the OwnerDraw property is set to allow custom cell drawing. | |
Fired after a value is read and before a value is written to a recordset to allow custom formatting. | |
Fired while printing the control to set repeating header rows. | |
This event occurs when a user presses a key while an object has the focus. | |
This event occurs when the user presses and releases an ANSI key. | |
Fired after a drop to inform the source component that a drag action was either performed or canceled. | |
Fired when a source component is dropped onto a target component. | |
Fired after every OLEDragOver event to allow the source component to provide visual feedback to the user. | |
Fired after an OLE drag operation is started (manually or automatically), allows you to provide a custom DataObject. | |
Fired on the source component when a target component performs the GetData method on the source’s DataObject object. | |
Fired after an OLE drag operation is started (manually or automatically). | |
Fired when the current cell (Row, Col) changes to a different cell. | |
Fired before the EditWindow is created, used to modify window styles. | |
Fired after the EditWindow has been created and before it is displayed. | |
Fired when the control enters cell edit mode (after BeforeEdit). | |