Column ordering
Control column positions by enabling dynamic reordering within the table.
Example
Id
Name
Category
Price Retail
1
Sleek Plastic Computer
Beauty
114.71
2
Generic Bronze Towels
Clothing
215.7
3
Incredible Granite Chair
Home & Garden
372.47
4
Oriental Metal Pants
Electronics
490.23
5
Fantastic Ceramic Bacon
Sports
260.04
6
Luxurious Ceramic Gloves
Clothing
477.12
7
Gorgeous Steel Bacon
Home & Garden
267.37
8
Tasty Silk Fish
Electronics
1722.59
9
Fresh Silk Shoes
Electronics
1404.24
10
Practical Aluminum Mouse
Electronics
1948.73
Per page:
Page 1 of 100
Showing
1
to
10
of 1000 rows
{#each datagrid.columns.getLeafColumns() as column}
{@render LeafHeader(column)}
{/each}
{#each datagrid.rows.getPaginatedRows() as row}
{#each datagrid.columns.getLeafColumns() as column}
{#if !row.isGroupRow()}
{/each}
{getCellContent(column, row.original)}
{:else}{/if}
{/each}
{column.header}
{#if column.options.moveable}
{/if}