BU01 Basic Grid

Display tabular data with columns, formatting, and styling

Live Demo

Striped rows, row numbers, formatted salary, and high-value highlighting.

Code
Complete Example
 
Key Features
Required Properties

columns - Array of column definitions

items - Array of data objects

Column Definition
  • field - Property name in data
  • title - Header text
  • width / minWidth / maxWidth
  • horizontalAlign - left, center, right, justify
  • verticalAlign - top, middle, bottom
  • headerHorizontalAlign / headerVerticalAlign
  • headerInfo - tooltip icon next to header
  • textOverflow - 'wrap' | 'ellipsis'
  • maxLines - line-clamp (with textOverflow: 'wrap')
  • cellClass - static CSS class per column
Display Options

isStriped - Alternate row colors

isHoverable - Highlight on hover

isRowNumbersVisible - Show row index

isStickyRowNumbers - Freeze row numbers

isFilterable - Enable column filtering

freezeColumns - Freeze N columns from left

tableBorderOnly - Border only around table

focusedRowIndex - Track focused row

sortMode - 'none' | 'single' | 'multi'

Content Rendering

formatCallback(value, row) - Return display string

templateCallback(row) - Return HTML string for the cell

renderCallback(row, element) - Imperative DOM rendering into the element

Styling

cellClassCallback(value, row) - Dynamic CSS classes

rowClassCallback(row, index) - Dynamic row classes

customStylesCallback - Inject CSS into shadow DOM

Grid Modes

Use mode for quick setup: 'read-only', 'excel', or 'input-matrix'