GridRow

Defines individual rows within a Grid component when not using query data. This component allows you to manually define row data and customize row appearance with styling and selection capabilities.

Syntax

<bx:gridrow 
    data="struct"
    bgcolor="string"
    textColor="string"
    selected="boolean"
    id="string"
    class="string"
    style="string">
</bx:gridrow>

Attributes

Attribute
Type
Required
Default
Description

data

struct

No

{}

Struct containing row data with column names as keys

bgcolor

string

No

""

Background color for the row (CSS color value)

textColor

string

No

""

Text color for the row (CSS color value)

selected

boolean

No

false

Whether this row is initially selected

id

string

No

auto-generated

HTML element ID for the row

class

string

No

""

Additional CSS classes for the row

style

string

No

""

Additional inline CSS styles for the row

Usage Notes

  • Must be used within a <bx:grid> component

  • Useful for defining static data rows when not using query data

  • Supports both struct data and delimited string formats

  • Row data is mapped to columns defined by GridColumn components

  • Automatically generates unique IDs if not provided

Examples

Basic Row Definition

Styled Rows

Pre-selected Rows

Using Delimited String Data

Custom Styling and IDs

Generated HTML

The GridRow component generates HTML table rows with the following structure:

CSS Classes

  • .bx-grid-row - Applied to all grid rows

  • .bx-grid-row-selected - Added when selected="true"

  • .bx-grid-cell - Applied to individual cells

  • .bx-grid-select-cell - Applied to selection cells (when grid supports selection)

Last updated

Was this helpful?