Column ordering
Control column positions by enabling dynamic reordering within the table.
Example
Id
Name
Category
Price Retail
1
Generic Cotton Gloves
Electronics
503.84
2
Handmade Cotton Chair
Beauty
215.22
3
Sleek Silk Fish
Beauty
16.52
4
Fantastic Silk Cheese
Sports
431.84
5
Unbranded Concrete Soap
Sports
183.1
6
Handcrafted Wooden Ball
Sports
151.93
7
Incredible Rubber Table
Clothing
49.5
8
Tasty Plastic Pizza
Electronics
647.13
9
Handmade Rubber Salad
Clothing
237.22
10
Practical Wooden Sausages
Beauty
230.67
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}