TTMSFNCCustomDataGrid Class
Full-featured TMS FNC DataGrid control. Manages cell data, sorting, grouping, filtering, selection, inline editing, import/export, row/column structure, and rendering. This class exposes the complete API but keeps most properties protected — use TTMSFNCDataGrid (the registered component) in forms and frames.
API unit family: TMSFNCDataGrid
Inherits from: TTMSFNCDataGridBase
Implements: ITMSFNCAppearanceGlobalFont, ITMSFNCDataGridRendererLink, ITMSFNCDataBinderGrid, ITMSFNCCustomReadWriteIO, ITMSFNCBitmapContainer, ITMSFNCDataObject
Syntax
TTMSFNCCustomDataGrid = class(TTMSFNCDataGridBase, ITMSFNCAppearanceGlobalFont, ITMSFNCDataGridRendererLink, ITMSFNCDataBinderGrid, ITMSFNCCustomReadWriteIO, ITMSFNCBitmapContainer, ITMSFNCDataObject)
Methods
| Name | Description |
|---|---|
| AddBitmap | Adds a bitmap cell using a TTMSFNCBitmap instance at the specified cell coordinate. |
| AddBitmapColumn | Applies a bitmap (by TTMSFNCBitmap) to every data row cell in the specified column. |
| AddButton | Adds a button cell with the specified caption at the given cell coordinate. |
| AddButtonColumn | Applies a button cell type to every data row cell in the specified column. |
| AddCheckBox | Adds a checkbox cell with the specified initial state at the given cell coordinate. |
| AddCheckBoxColumn | Applies a checkbox cell type to every data row cell in the specified column. |
| AddColumn | Appends a new empty column on the right side of the grid. |
| AddDataCheckBox | Adds a data-bound checkbox control to the specified cell coordinate. |
| AddDataCheckBoxColumn | Adds data-bound checkbox controls to every data cell in the specified column. |
| AddDataProgressBar | Adds a data-bound progress bar control to the specified cell coordinate. |
| AddDataProgressBarColumn | Adds data-bound progress bar controls to every data cell in the specified column. |
| AddDataRadioButton | Adds a data-bound radio button control to the specified cell coordinate. |
| AddDataRadioButtonColumn | Adds data-bound radio button controls to every data cell in the specified column. |
| AddFilterEditor | Adds an inline filter editor control to the specified fixed-row cell. |
| AddGrid | Embeds a nested sub-grid renderer in the specified cell and returns the renderer for further configuration. |
| AddNodeRow | Converts a data row into a collapsible tree node row with the specified number of child rows at the given nesting level. |
| AddProgressBar | Adds a progress bar cell with the specified initial value at the given cell coordinate. |
| AddProgressBarColumn | Applies a progress bar cell type to every data row cell in the specified column. |
| AddRadioButton | Adds a radio button cell with the specified initial state and group index at the given cell coordinate. |
| AddRadioButtonColumn | Applies a radio button cell type to every data row cell in the specified column. |
| AddRow | Appends a new empty data row at the bottom of the grid. |
| ApplyFilter | Applies the filter rules configured in the Filter property and updates visible rows accordingly. |
| AutoFill | Fills a target range by extending the data pattern from the source range (Excel-style fill handle behaviour). |
| AutoFillCustomListRemove | Removes a single custom auto-fill sequence list by its key. |
| AutoFillCustomListSet | Registers or updates a custom auto-fill sequence list (e.g. months, weekdays) identified by AKey. |
| AutoFillCustomListTryGet | Retrieves a named custom auto-fill sequence list. |
| AutoFillCustomListsClear | Removes all custom auto-fill sequence lists. |
| AutoFillCustomListsCount | Returns the number of registered custom auto-fill sequence lists. |
| AutoNumberColumn | Fills the specified column with sequential integer values starting from AStartValue. |
| AutoNumberRow | Fills the specified row with sequential integer values starting from AStartValue. |
| AutoSizeColumn | Resizes the specified column to fit its widest content. |
| AutoSizeColumns | Resizes all columns to fit their widest content. |
| AutoSizeGrid | Resizes both all columns and all rows to fit their content. |
| AutoSizeRow | Resizes the specified row to fit its tallest content. |
| AutoSizeRows | Resizes all rows to fit their tallest content. |
| BaseCell | Returns the top-left anchor cell of a merged group; returns ACell itself when the cell is not part of a merge. |
| CanDeleteColumn | Checks whether deleting the specified column is permitted by grid options and events. |
| CanDeleteRow | Checks whether deleting the specified row is permitted by grid options and events. |
| CanInsertColumn | Checks whether inserting a column at the specified index is permitted by grid options and events. |
| CanInsertRow | Checks whether inserting a row at the specified index is permitted by grid options and events. |
| CanMergeCells | Returns True when the described rectangular range can be merged without conflicting with any existing cell merges. |
| CanMoveColumn | Checks whether moving a column from one index to another is permitted by grid options and events. |
| CanMoveRow | Checks whether moving a row from one index to another is permitted by grid options and events. |
| CanSwapColumn | Checks whether swapping two columns is permitted by grid options and events. |
| CanSwapRow | Checks whether swapping two rows is permitted by grid options and events. |
| CancelEditing | Cancels the active in-place editor without saving changes. |
| ClearCells | Clears the values and cell data in the specified cell range. |
| ClearColumns | Removes all columns from the grid. |
| ClearControlCache | Clears cached real-control instances used for embedded cell controls. |
| ClearFilter | Clears all filter rules and makes all rows visible again. Equivalent to RemoveFilter. |
| ClearNodeRow | Clears the child cell data of a node row while preserving its node structure. |
| ClearSelection | Deselects all currently selected cells. |
| CloseFilterPopup | Closes the active filter popup, if one is open. |
| CollapseAllNodes | Collapses all node rows in the grid, hiding their child rows. |
| CollapseNode | Collapses the specified node row, hiding its child rows. |
| ColumnAverage | Returns the average of numeric values in the data rows of a column. AFromRow/AToRow default to -1 meaning all data rows. |
| ColumnByHeader | Finds a column definition by its header caption; returns nil if no match is found. |
| ColumnByName | Finds a column definition by its design-time Name property; returns nil if not found. |
| ColumnCalculation | Runs a built-in aggregate calculation on a column and stores the result in the associated summary rows. |
| ColumnCustomCalculation | Runs a user-supplied callback over column values and returns the computed result. |
| ColumnDistinct | Returns the count of distinct (unique) values in the data rows of a column. |
| ColumnIndexByHeader | Returns the zero-based column index by searching for a matching header caption; returns -1 if not found. |
| ColumnIndexByName | Returns the zero-based column index by searching for a matching design-time Name; returns -1 if not found. |
| ColumnMax | Returns the maximum numeric value across the data rows of a column. |
| ColumnMin | Returns the minimum numeric value across the data rows of a column. |
| ColumnSpan | Returns the number of columns the cell spans due to a horizontal merge (1 for a non-merged cell). |
| ColumnStandardDeviation | Returns the population standard deviation of numeric values in the data rows of a column. |
| ColumnSum | Returns the sum of numeric values in the data rows of a column. |
| CopyToClipboard | Copies selected (or all) cells to the clipboard as tab-delimited text. |
| CutToClipboard | Copies selected (or all) cells to the clipboard and clears the source cells. |
| DeleteColumn | Removes the specified column from the grid. |
| DeleteColumns | Removes ACount consecutive columns starting at AColumn. |
| DeleteRow | Removes the specified row from the grid. |
| DeleteRows | Removes ACount consecutive rows starting at ARow. |
| DisplayToRealCell | Converts a display-order cell coordinate to the physical storage coordinate. |
| DisplayToRealColumn | Converts a display-order column index to the physical storage column index. |
| DisplayToRealRow | Converts a display-order row index to the physical storage row index. Sort-aware; not affected by filter. |
| Draw | Draws the grid to the supplied graphics context and rectangle. |
| EditCell | Opens the in-place editor for the specified cell. |
| ExpandAllNodes | Expands all node rows in the grid, making their child rows visible. |
| ExpandNode | Expands the specified node row, making its child rows visible. |
| Find | Searches the grid for the given text and returns the first matching cell coordinate. |
| FindAll | Finds all occurrences of a text; sets AResults to the total count and returns the first matching cell. |
| FindFirst | Begins a stateful search; call FindNext to advance to subsequent matches. |
| FindNext | Advances to the next match in a stateful search started by FindFirst. |
| FirstPage | Navigates to the first page when footer paging is enabled. |
| GetCellKind | Returns the kind (type) of the specified cell, such as normal text, button, checkbox, bitmap, progress bar, etc. |
| GetCellSize | Returns the pixel size of the cell including any column/row span due to merging. |
| GetMaxLevel | Returns the deepest nesting level among all grouped node rows in the grid. |
| GetParentRow | Returns the parent node row index for a child row in a tree structure. |
| GetRootRow | Returns the top-level root node row index for any child row in a tree structure. |
| GoToCell | Scrolls to and optionally selects the specified cell. |
| GoToFirstPage | Navigates to the first page when footer paging is enabled. |
| GoToLastPage | Navigates to the last page when footer paging is enabled. |
| GoToPage | Navigates to the specified page index when footer paging is enabled. |
| Group | Groups data rows by the values in the specified column, inserting group header rows. |
| GroupAverage | Applies an average aggregate to the group header rows for the specified column. |
| GroupCalculation | Runs a built-in aggregate calculation on a column and stores the result in group summary rows. |
| GroupCount | Applies a count aggregate to the group header rows for the specified column. |
| GroupCustomCalculation | Runs a custom calculation callback on a column and stores results in group summary rows. |
| GroupDistinct | Applies a distinct-count aggregate to the group header rows for the specified column. |
| GroupMax | Applies a maximum aggregate to the group header rows for the specified column. |
| GroupMin | Applies a minimum aggregate to the group header rows for the specified column. |
| GroupSort | Sorts group headers by the key or aggregate value of the specified column. |
| GroupStandardDeviation | Applies a standard deviation aggregate to the group header rows for the specified column. |
| GroupSum | Applies a sum aggregate to the group header rows for the specified column. |
| HasRowData | Returns True when the specified row contains at least one non-empty cell value. |
| HideColumn | Hides the specified column while preserving its stored width. |
| HideRow | Hides the specified row while preserving its stored height. |
| HilightCells | Visually highlights cells whose text matches AHilightText according to the given options. |
| InitSample | Fills the grid with built-in demo data; useful as a first-run placeholder during development. |
| InsertColumn | Inserts a new empty column before the specified column index. |
| InsertColumns | Inserts ACount new empty columns before the specified column index. |
| InsertRow | Inserts a new empty row before the specified row index. |
| InsertRows | Inserts ACount new empty rows before the specified row index. |
| IsCellBase | Returns True when the cell is the top-left base cell of a merge group (or is not merged at all). |
| IsCellDisabled | Returns True when the specified cell is disabled for interaction. |
| IsCellDisplayed | Returns True when the specified cell is part of the current displayed data view. |
| IsCellFixed | Returns True when the specified cell belongs to a fixed row or column. |
| IsCellFixedRoot | Returns True when the specified cell is fixed in the root grid area. |
| IsCellFreeze | Returns True when the specified cell belongs to a frozen row or column. |
| IsCellFreezeFixed | Returns True when the specified cell is both frozen and fixed. |
| IsCellFreezeRoot | Returns True when the specified cell belongs to the root frozen area. |
| IsCellHidden | Returns True when the cell belongs to a hidden column or row. |
| IsCellMerged | Returns True when the cell is part of a merged range (including the base cell). |
| IsCellSelected | Returns True when the cell is currently selected. |
| IsCellValid | Returns True when the specified cell coordinate is inside the grid bounds. |
| IsCellVisible | Returns True when the specified cell is valid and not hidden from the current layout. |
| IsColumnDisplayed | Returns True when the specified column is part of the current displayed data view. |
| IsColumnHidden | Returns True when the specified column is hidden. |
| IsColumnMerged | Returns True when the specified column participates in a merged range. |
| IsColumnValid | Returns True when the specified column index is inside the grid bounds. |
| IsColumnVisible | Returns True when the specified column is valid and not hidden. |
| IsEditing | Returns True when an in-place editor is currently open for any cell. |
| IsFixedCellSelected | Returns True when a fixed (header) cell is part of the current selection. |
| IsGrouped | Returns True when grouping is currently applied to the grid. |
| IsRowBand | Returns True when the row is an alternating band row used for visual striping. |
| IsRowDisplayed | Returns True when the specified row is part of the current displayed data view. |
| IsRowFilter | Returns True when the row is an inline filter editor row. |
| IsRowFiltered | Returns True when the specified row is excluded by the active filter. |
| IsRowHidden | Returns True when the specified row is hidden. |
| IsRowMerged | Returns True when the specified row participates in a merged range. |
| IsRowNode | Returns True when the row is a collapsible tree node row. |
| IsRowNormal | Returns True when the row is a regular data row (not a node, band, filter, or summary row). |
| IsRowSummary | Returns True when the row is a group summary row inserted by a grouping or calculation operation. |
| IsRowValid | Returns True when the specified row index is inside the grid bounds. |
| IsRowVisible | Returns True when the specified row is valid and not hidden. |
| LastPage | Navigates to the last page when footer paging is enabled. |
| LinearFill | Fills all data cells (and optionally fixed cells) with sequential integer values. |
| LoadFromCSVData | Loads cell data from a CSV file using the default encoding. |
| LoadFromCSVStreamData | Loads cell data from a CSV stream using the default encoding. |
| LoadFromFileData | Loads cell data from the native grid file format using the default encoding. |
| LoadFromFileStreamData | Loads cell data from the native grid file format from a stream using the default encoding. |
| LoadFromJSONData | Loads data from a JSON file using the specified encoding; ARowDataName/AColumnDataName/AColumnNames map JSON keys to grid rows and columns. |
| LoadFromJSONStreamData | Loads data from a JSON stream using the specified encoding. |
| LoadFromJSONTextData | Loads data from a JSON string. |
| LoadFromXMLData | Loads data from an XML file using the default encoding. |
| LoadFromXMLStreamData | Loads data from an XML stream using the default encoding. |
| LoadSampleData | Fills the grid with built-in demo data. |
| LogMessage | Raises the grid log-message event with the specified text and severity. |
| LoopThroughColumns | Executes a callback for each column, optionally including fixed columns. |
| LoopThroughRows | Executes a callback for each row, optionally including fixed rows. |
| MarkCells | Marks cells whose text matches AHilightText for persistent flagging independent of visual highlighting. |
| MatchFilter | Returns True when the specified row satisfies all currently active filter conditions. |
| MergeCells | Merges a rectangular block of cells into a single display cell. |
| MergeColumn | Vertically merges all data cells in the specified column into a single display cell. |
| MergeColumns | Vertically merges all data cells in ACount consecutive columns starting at AColumn. |
| MergeRange | Merges all cells within the given coordinate range. |
| MergeRow | Horizontally merges all data cells in the specified row into a single display cell. |
| MergeRows | Horizontally merges all data cells in ACount consecutive rows starting at ARow. |
| MoveColumn | Reorders a column by moving it from AFromColumn to AToColumn. |
| MoveRow | Reorders a row by moving it from AFromRow to AToRow. |
| NextPage | Navigates to the next page when footer paging is enabled. |
| NextSelectableColumn | Returns the next selectable cell coordinate to the right, skipping hidden and disabled cells. |
| NextSelectableRow | Returns the next selectable cell coordinate below, skipping hidden and disabled cells. |
| NextVisibleColumn | Returns the next visible cell coordinate to the right, skipping hidden columns. |
| NextVisibleRow | Returns the next visible cell coordinate below, skipping hidden rows. |
| PasteFromClipboard | Pastes tab-delimited text from the clipboard starting at the focused cell. |
| PreviousPage | Navigates to the previous page when footer paging is enabled. |
| PreviousSelectableColumn | Returns the previous selectable cell coordinate to the left, skipping hidden and disabled cells. |
| PreviousSelectableRow | Returns the previous selectable cell coordinate above, skipping hidden and disabled cells. |
| PreviousVisibleColumn | Returns the previous visible cell coordinate to the left, skipping hidden columns. |
| PreviousVisibleRow | Returns the previous visible cell coordinate above, skipping hidden rows. |
| RandomFill | Fills all data cells (and optionally fixed cells) with random integer values. |
| RealToDisplayCell | Converts a physical storage cell coordinate to the display-order coordinate. |
| RealToDisplayColumn | Converts a physical storage column index to the display-order column index. |
| RealToDisplayRow | Converts a physical storage row index to the display-order row index. Sort-aware; not affected by filter. |
| RealToVisualColumn | Converts a physical storage column index to the 0-based column index in the currently rendered output (reorder + hidden applied). Returns -1 when the column is hidden. Fixed columns map unchanged. |
| RealToVisualRow | Converts a physical storage row index to the 0-based row index in the currently rendered output (sort + filter + hidden applied). Returns -1 when the row is filtered or hidden. Fixed rows map unchanged. |
| RemoveBitmap | Removes the bitmap cell type from the specified cell, reverting it to a plain text cell. |
| RemoveButton | Removes the button cell type from the specified cell, reverting it to a plain text cell. |
| RemoveCheckBox | Removes the checkbox cell type from the specified cell, reverting it to a plain text cell. |
| RemoveDataCheckBox | Removes the data-bound checkbox control from the specified cell coordinate. |
| RemoveDataRadioButton | Removes the data-bound radio button control from the specified cell coordinate. |
| RemoveFilter | Clears all filter rules and makes all rows visible again. |
| RemoveFilterEditor | Removes the inline filter editor from the specified fixed-row cell. |
| RemoveGrid | Removes the nested sub-grid renderer from the specified cell, reverting it to a plain cell. |
| RemoveLayout | Removes the custom layout assigned to the specified cell coordinate. |
| RemoveNodeRow | Removes the node structure from a row, making it a plain data row again. |
| RemoveProgressBar | Removes the progress bar cell type from the specified cell, reverting it to a plain text cell. |
| RemoveRadioButton | Removes the radio button cell type from the specified cell, reverting it to a plain text cell. |
| Replace | Replaces all occurrences of a value with a new value in all cells; returns the number of replacements made. |
| ResetDrag | Resets the current drag operation and clears drag state. |
| RowAverage | Returns the average of numeric values across the data columns of a row. |
| RowCalculation | Runs a built-in aggregate calculation across a row and stores the result in associated summary columns. |
| RowCustomCalculation | Runs a user-supplied callback over row values and returns the computed result. |
| RowDistinct | Returns the count of distinct (unique) values across the data columns of a row. |
| RowMax | Returns the maximum numeric value across the data columns of a row. |
| RowMin | Returns the minimum numeric value across the data columns of a row. |
| RowSpan | Returns the number of rows the cell spans due to a vertical merge (1 for a non-merged cell). |
| RowStandardDeviation | Returns the population standard deviation of numeric values across the data columns of a row. |
| RowSum | Returns the sum of numeric values across the data columns of a row. |
| SaveToCSVData | Saves cell data to a CSV file using the default encoding. |
| SaveToCSVStreamData | Saves cell data to a CSV stream using the default encoding. |
| SaveToFileData | Saves cell data to the native grid file format using the default encoding. |
| SaveToFileStreamData | Saves cell data to the native grid file format into a stream using the default encoding. |
| SaveToHTMLData | Exports the visible grid content as an HTML table to a file using the default encoding. |
| SaveToHTMLStreamData | Exports the visible grid content as an HTML table into a stream using the default encoding. |
| SaveToImageData | Renders the grid to a PNG image file. |
| SaveToImageStreamData | Renders the grid to a PNG image written to a stream. |
| Scroll | Programmatically scrolls the grid to the given pixel position. |
| SelectAllCells | Selects all data cells in the grid. |
| SelectCell | Selects the specified cell, optionally applying Shift or Ctrl multi-selection semantics. |
| SelectCellRange | Selects a rectangular range of cells defined by column and row indices. |
| SelectColumns | Selects all cells in the specified column range. |
| SelectRows | Selects all cells in the specified row range. |
| SetBitmap | Replaces the existing cell content with a bitmap cell using a TTMSFNCBitmap instance. |
| SetBitmapColumn | Replaces every data row cell in the column with a bitmap cell using a TTMSFNCBitmap. |
| SetButton | Replaces the existing cell content with a button cell having the given caption. |
| SetButtonColumn | Replaces every data row cell in the column with a button cell. |
| SetCheckBox | Replaces the existing cell content with a checkbox cell having the given initial state. |
| SetCheckBoxColumn | Replaces every data row cell in the column with a checkbox cell. |
| SetGrid | Replaces the cell content with a nested sub-grid renderer and returns the renderer. Use when the cell already exists. |
| SetNodeRow | Replaces an existing row with a collapsible tree node row; same behaviour as AddNodeRow but works on an existing row. |
| SetProgressBar | Replaces the existing cell content with a progress bar cell having the given initial value. |
| SetProgressBarColumn | Replaces every data row cell in the column with a progress bar cell. |
| SetRadioButton | Replaces the existing cell content with a radio button cell having the given state and group index. |
| SetRadioButtonColumn | Replaces every data row cell in the column with a radio button cell. |
| ShowColumnsEditor | Opens the column visibility and order editor dialog. |
| ShowFilterDialog | Opens the advanced filter dialog for configuring filter rules. |
| ShowFindDialog | Opens the find dialog for searching cell text. |
| ShowReplaceDialog | Opens the find-and-replace dialog. |
| Sort | Sorts all data rows by the specified column and direction. |
| SortIndexed | Re-applies the last sort using the previously computed sort index list. |
| SplitCell | Removes the merge from a merged cell, restoring the individual cells within the formerly merged area. |
| StopEditing | Closes the in-place editor and commits changes; returns True if an editor was active. |
| StretchColumns | Stretches columns according to the requested mode, range, and optional target width. |
| StretchRows | Stretches rows according to the requested mode, range, and optional target height. |
| SwapCells | Exchanges the content of two cells. |
| SwapColumns | Exchanges the position of two columns, swapping all their cell data. |
| SwapRows | Exchanges the position of two rows, swapping all their cell data. |
| ToggleNode | Toggles the expand/collapse state of the specified node row. |
| TypeOfValue | Returns the type kind (tkFloat, tkInteger, tkString, etc.) of the raw cell value. |
| Ungroup | Removes all grouping and returns the grid to a flat, ungrouped view. |
| UnhideAll | Unhides all hidden rows and columns. |
| UnhideAllColumns | Unhides all hidden columns. |
| UnhideAllRows | Unhides all hidden rows. |
| UnhideColumn | Unhides the specified column. |
| UnhideRow | Unhides the specified row. |
| UnhilightCells | Removes visual highlights previously applied by HilightCells. |
| UnmarkCells | Removes persistent cell marks previously applied by MarkCells. |
| UpdateCalculations | Re-runs all column and row calculations and refreshes summary rows. |
| UpdateColumnCalculation | Re-runs a single named column calculation identified by AName for the specified column. |
| UpdateColumnCalculations | Re-runs all named column calculations. |
| UpdateRowCalculation | Re-runs a single named row calculation identified by AName for the specified row. |
| UpdateRowCalculations | Re-runs all named row calculations. |
| ValueIsEmpty | Returns True when the raw cell value is nil or an empty string. |
| ValueIsFloat | Returns True when the raw cell value represents a floating-point number. |
| ValueIsInteger | Returns True when the raw cell value represents an integer. |
| ValueIsString | Returns True when the raw cell value is a string type. |
| ValueToBoolean | Safely converts a raw cell value to a Boolean using default formatting. |
| ValueToFloat | Safely converts a raw cell value to a Double using default formatting. |
| ValueToInt64 | Safely converts a raw cell value to an Int64 using default formatting. |
| ValueToInteger | Safely converts a raw cell value to an Integer using default formatting. |
| ValueToString | Safely converts a raw cell value to a string using default formatting. |
| VisualToRealColumn | Converts a 0-based column index in the currently rendered output (reorder + hidden applied) back to the physical storage column index. Fixed left/right columns map through unchanged. |
| VisualToRealRow | Converts a 0-based row index in the currently rendered output (sort + filter applied) back to the physical storage row index. Fixed top/bottom rows map through unchanged. |
| XYToCell | Converts a pixel coordinate (relative to the control) to a cell coordinate. |
| XYToColumn | Returns the zero-based column index of the column under the given pixel coordinate. |
| XYToFooter | Returns True when the given pixel coordinate falls within the footer area. |
| XYToHeader | Returns True when the given pixel coordinate falls within the header area. |
| XYToHeaderGroup | Returns the header group object located under the given pixel coordinate, or nil if none. |
| XYToRenderer | Returns the renderer responsible for the given pixel coordinate. |
| XYToRow | Returns the zero-based row index of the row under the given pixel coordinate. |