Skip to content

TWebDataGrid

Description

TWebDataGrid is a component that wraps the free MIT licensed Ag-Grid. It exposes its rich feature set via an Object Pascal class for use in TMS WEB Core.
Below is a list of the most important properties methods and events for TWebDataGrid.

Designtime Runtime

HTML template tag

The HTML tag the component can be associated with in an HTML template. Assign the ID attribute to the HTML element with a unique value and set the identical value to the ElementID property. Detailed information can be found in the Use of HTML templates topic.

HTML tag <SPAN ID=”UniqueID”></SPAN>
ElementID UniqueID

Properties for TWebDataGrid

Property Name Description
Banding Configuration for banding styles in the grid.
BidiMode Bi-directional mode for supporting languages written in a right-to-left direction (e.g., Arabic).
CacheBlockSize Size of the block of rows fetched from the server when using a server-side row model.
ColumnDefs Reference to the collection of column definitions configured for the grid.
EditType Determines the type of editing allowed (cell or row-based editing).
EnableClickSelection Enables the selection of rows via clicking.
MaxBlocksInCache Maximum number of blocks of rows that can be stored in the cache.
MultilevelHeaders Reference to the collection of multilevel headers configured for the grid.
Pagination Enables or disables pagination in the grid.
PaginationAutoPageSize Automatically adjusts the page size based on the grid size.
PaginationPageSize Sets the number of rows per page in the grid.
PaginationPageSizeSelector Allows selection of page size dynamically from a predefined set of options.
PopupMenu Assigns a popup menu to the grid for additional interaction options.
RowHeight Sets the height of rows in the grid.
RowMultiSelectWithClick Allows multiple rows to be selected with simple clicks without needing to hold a modifier key.
RowSelection Type of row selection (single, multiple, none).
ServerDataAdapter Reference to the adapter handling server-side data interactions.
SuppressMoveWhenColumnDragging Suppresses row moving when dragging columns.
Theming Configuration for theme styles applied to the grid.
Visible Determines the visibility of the grid component.

Events for TWebDataGrid

Event Name Description
OnCellEditingEnded Triggered when editing of a cell ends.
OnCellEditingStarted Triggered when editing of a cell starts.
OnGetRowClass Allows assigning CSS classes to rows dynamically.
OnGetRowHeight Triggered to determine the height of rows dynamically.
OnGetRowStyle Allows custom styles to be applied to rows based on conditions.
OnHttpRequest Triggered when an HTTP request is initiated by the grid.
OnHttpRequestError Triggered when an HTTP request initiated by the grid encounters an error.
OnHttpRequestSuccess Triggered when an HTTP request initiated by the grid completes successfully.
OnRowEditingEnded Triggered when editing of a row ends.
OnRowEditingStarted Triggered when editing of a row starts.
OnRowSelected Triggered when a row is selected in the grid.
OnSelectionChanged Triggered when the selection changes in the grid.

Methods for TWebDataGrid

Method Name Description
DeleteSelectedRows Deletes all rows that are currently selected in the grid.
EnsureLastRowVisible Ensures that the last row in the grid is visible, typically after an insert or data change operation.
InsertNewRow Inserts a new row at a specified position in the grid, often used in editable grids for adding new entries.
LoadFromCSV Loads data into the grid from a CSV file specified by a URL.
LoadFromCSVString Loads data into the grid from a CSV string.
LoadFromJSON Loads data into the grid from a JSON source, either from a URL or directly from a JSON object.
LoadFromStrings Loads data into the grid from a TStrings object, useful for loading from local resources or complex inputs.
SaveAsCSVToString Saves the grid's data to a string in CSV format.
SaveToCSV Saves the grid's data to a CSV file.