Row selection
Select rows in a table for actions like editing, deleting, or multi-row operations.
Example
Id
Name
Category
Price Retail
Status
1
Generic Concrete Pizza
Sports
463.16
in-stock
2
Sleek Granite Computer
Sports
286.58
in-stock
3
Gorgeous Steel Chicken
Sports
14.94
in-stock
4
Modern Ceramic Cheese
Clothing
358.83
in-stock
5
Tasty Concrete Ball
Home & Garden
57.13
in-stock
6
Practical Cotton Chicken
Clothing
345.04
in-stock
7
Intelligent Bronze Mouse
Electronics
910.28
discontinued
8
Soft Cotton Chicken
Beauty
450.26
in-stock
9
Tasty Wooden Salad
Beauty
214.6
in-stock
10
Ergonomic Steel Keyboard
Beauty
141.71
in-stock
Per page:
Page 1 of 100
Showing
1
to
10
of 1000 rows
{ "selectedRowIds": [] }
{ "selectedRows": [] }
{#each datagrid.columns.getLeafColumnsInOrder() as column}
{@render LeafHeader(column)}
{/each}
{#each datagrid.rows.getPaginatedRows() as row}
{/if}
{/each}
{#if !row.isGroupRow()}
{#each datagrid.columns.getLeafColumnsInOrder() as column}
{@render RenderBodyCell(column, row)}
{/each}
{:else}{/if}
{#if row.isExpanded()}
Evil cannot create anything new, they can only corrupt and ruin what good forces
have invented or made.
{JSON.stringify( { selectedRowIds: Array.from(datagrid.features.rowSelection.selectedRowIds) }, null, 2 )}
{JSON.stringify( { selectedRows: datagrid.features.rowSelection.getSelectedOriginalRows() }, null, 2 )}
{getCellContent(column, row.original)}
{/if}
{/snippet}
{#snippet LeafHeader(column: LeafColumn)}
{#if column.isVisible()}
{column.header}