Skip to main content

TDGrid

The TDGrid widget displays data as a table (grid) of multiple rows and columns.
It supports headers and footers, per-column cells, sorting, row and column controls, and scroll events — use it to build list and table screens.

info

This widget is locked on the Free plan. It's available on the Pro and Enterprise plans.

Definition and role

The TDGrid widget draws a spreadsheet-style grid that lays data out in rows and columns. Each column is built from cell widgets, and binding to data renders one row per item. It provides header and footer rows, column visibility and width adjustment, sorting, per-row styling (color, height, border, and visibility), frozen rows, and scroll events.

  • Category: Layouts
  • Default setup: header on (useHeader = on), footer off (useFooter = off), and 0 data rows

Features

FeatureDescription
Row and column dataBind data to render one row per item, and build each column from cell widgets.
Header / footerTurn the header row at the top and the footer row at the bottom on or off. Each one has its own height, background, and divider settings.
SortingSort rows by the value of a chosen column (property) in ascending order, descending order, or the original order.
Column controlShow or hide individual columns and adjust their width — optionally with animation — and rearrange the column order.
Per-row stylingSet visibility, background color, border, and height for each row.
Frozen rowsFreeze a set number of rows from the top so they stay in place no matter how far the grid scrolls.
Scroll eventsRun actions when scrolling starts, updates, stops, or reaches the end. When horizontal scrolling is available, the header can show left and right navigation buttons.

How to use

  1. Open the Layouts category in the left widget palette.
  2. Drag and drop the TDGrid item onto the canvas.
  3. In the Properties panel on the right, configure the columns (columns) and bind each cell's content to your data.
  4. If needed, turn on the header and footer with useHeader and useFooter, then shape the table with frozenRowCount, rowHeight, and more.
  5. To react to scrolling, connect the logic or script you want to run to the scroll events.

Properties

note

Set detailed values — row height, colors, divider thickness, and so on — in the properties below and in the shared Style settings. The table below lists the TDGrid properties that appear in the Properties panel.

PropertyDescriptionDefaultValues / type
useHeaderWhether to use a header rowtrue (on)true / false
useHeaderLineWhether to show the header dividertruetrue / false
useHeaderScrollButtonShow left and right navigation buttons in the header when horizontal scrolling is availabletruetrue / false
headerHeightHeader row heightDefault row heightNumber (px)
headerBgColorHeader background colorNot setColor
headerLineColorHeader divider colorNot setColor
headerLineThicknessHeader divider thickness1.0Number (0.1–10.0)
paddingInner padding of the gridNot setPadding value
primaryWhether this acts as the primary scroll viewNot settrue / false
columnsList of column definitions for the gridNot set (empty list)Column list
rowHeightData row heightDefault row heightNumber (0 or greater, px)
frozenRowCountNumber of rows to freeze at the top0Number (0–20)
useRowLineWhether to show dividers between data rowsfalse (off)true / false
itemCountNumber of data rows0Number (0 or greater)
rowLineColorRow divider colorNot setColor
rowLineThicknessRow divider thickness1.0Number (0.1–10.0)
useFooterWhether to use a footer rowfalse (off)true / false
useFooterLineWhether to show the footer dividertruetrue / false
footerHeightFooter row heightDefault row heightNumber (px)
footerBgColorFooter background colorNot setColor
footerLineColorFooter divider colorNot setColor
footerLineThicknessFooter divider thickness1.0Number (0.1–10.0)

Notes and tips

tip

Turn on useHeader and the top row becomes the header; turn on useFooter and the bottom row is added as the footer. The remaining rows are the data area, which repeats once for every item in the bound data.

note

frozenRowCount accepts values from 0 to 20 only. The number of rows actually frozen never exceeds the number of data rows.

Learn more

tip

For the complete Widget Control (Property, Method, and Event) reference for scripting this widget, see TDGrid Widget Control.