Skip to content

Data Grid - Layout

The data grid offers multiple layout modes.

Percentage dimensions

When using % (percentage) for your height or width, you need to make sure the container you are putting the data grid into also has an intrinsic dimension. The browsers fit the element according to a percentage of the parent dimension. If the parent has no dimensions, then the % will be zero.

Predefined dimensions

You can predefine dimensions for the parent of the data grid.

Desk
Commodity
Trader Name
Trader Email
Quantity
D-6594
Adzuki bean
Mitchell Hale
15,681
D-5296
Cotton No.2
Beulah Neal
5,969
D-5318
Soybean Oil
Lina Sims
82,873
D-4709
Rapeseed
Daisy Briggs
23,879
D-8301
Wheat
Barry Garner
60,252

Rows per page:

1–5 of 5

Press Enter to start editing

Auto height

The autoHeight prop allows the data grid to size according to its content. This means that the number of rows will drive the height of the data grid and consequently, they will all be rendered and visible to the user at the same time.

Desk
Commodity
Trader Name
Trader Email
Quantity
D-5876
Frozen Concentrated Orange Juice
Jonathan Ramirez
19,354
D-5023
Frozen Concentrated Orange Juice
Lloyd Stephens
15,394
D-6309
Soybeans
Sean Ferguson
89,972

Rows per page:

1–3 of 3

Press Enter to start editing