Column Reordering
Grid columns can be dragged & dropped.
| Date | Name | Continent | Browser | OS | Visits |
|---|---|---|---|---|---|
| 05/13/2026 | Cassidy Kreiger | Africa | Firefox | Mac OS | 14 |
| 07/23/2026 | Julianne Johnson | Africa | Internet Explorer | Ubuntu | 65 |
| 05/23/2026 | Edmund Kuhlman | Africa | Edge | Mac OS | 56 |
| 05/21/2026 | Junior Weissnat | Asia | Safari | Ubuntu | 12 |
| 06/27/2026 | Declan Becker | Australia | Chrome | Ubuntu | 9 |
| 06/20/2026 | Ines Skiles | South America | Opera | Ubuntu | 69 |
| 05/22/2026 | Maryjane Aufderhar | Australia | Internet Explorer | iOS | 52 |
| 06/26/2026 | Adolfo Tremblay | Africa | Internet Explorer | iOS | 64 |
| 07/26/2026 | Emelie Bogisich | Africa | Firefox | Mac OS | 69 |
| 05/25/2026 | Sandrine Wisoky | South America | Safari | Ubuntu | 94 |
| 08/10/2026 | Wyman Davis | Africa | Opera | Mac OS | 73 |
| 08/09/2026 | Pansy Stamm | South America | Safari | iOS | 80 |
| 06/27/2026 | Carmela Mann | Asia | Chrome | Windows | 47 |
| 06/15/2026 | Amely Lubowitz | Australia | Opera | Ubuntu | 74 |
| 06/11/2026 | Wilma Schmidt | Africa | Opera | iOS | 23 |
| 08/06/2026 | Jerod Fay | Antarctica | Firefox | Mac OS | 70 |
| 08/06/2026 | Prudence Hegmann | Asia | Internet Explorer | Ubuntu | 55 |
| 06/05/2026 | Maynard Baumbach | Africa | Opera | Ubuntu | 53 |
| 07/19/2026 | Carolyn Glover | Australia | Firefox | Mac OS | 80 |
| 05/11/2026 | Adella Daugherty | Africa | Edge | iOS | 85 |
| 06/27/2026 | Reymundo Lindgren | Africa | Safari | Windows | 21 |
| 07/06/2026 | Mikel Corkery | Europe | Opera | Android | 16 |
| 08/07/2026 | Raphael Kub | Asia | Internet Explorer | Android | 60 |
| 06/23/2026 | Rylee Parker | Australia | Internet Explorer | Ubuntu | 97 |
| 07/01/2026 | Queenie Reichert | Australia | Edge | Mac OS | 22 |
| 06/14/2026 | Rico Runolfsdottir | Australia | Safari | Mac OS | 33 |
| 08/15/2026 | Theron Corkery | North America | Internet Explorer | Mac OS | 10 |
| 05/12/2026 | Tre Berge | Australia | Chrome | Mac OS | 43 |
| 07/15/2026 | Deshaun Boyer | South America | Internet Explorer | Ubuntu | 91 |
| 07/28/2026 | Odell Stroman | Asia | Edge | Mac OS | 39 |
| 07/18/2026 | Roselyn Aufderhar | Africa | Edge | Windows | 89 |
| 06/30/2026 | Mara Schmeler | Asia | Opera | Ubuntu | 10 |
| 07/13/2026 | Cassidy Kuhic | Australia | Firefox | Ubuntu | 56 |
| 07/09/2026 | Ezra Beier | Asia | Internet Explorer | Android | 55 |
| 07/10/2026 | Wilfredo Rippin | North America | Chrome | Android | 43 |
| 07/30/2026 | Garett Schowalter | Australia | Firefox | Ubuntu | 36 |
| 07/15/2026 | Emily Keebler | North America | Chrome | Mac OS | 5 |
| 07/20/2026 | Bud King | Europe | Edge | iOS | 30 |
| 05/15/2026 | Lempi Treutel | South America | Safari | Windows | 45 |
| 08/13/2026 | Newell Stamm | South America | Edge | Mac OS | 35 |
| 06/30/2026 | Daron Herman | North America | Safari | Mac OS | 74 |
| 06/04/2026 | Krystina Rutherford | South America | Internet Explorer | Mac OS | 45 |
| 06/12/2026 | Dane Gislason | South America | Chrome | Ubuntu | 56 |
| 06/25/2026 | Morton Homenick | Africa | Opera | iOS | 40 |
| 05/12/2026 | Hermann Rolfson | North America | Safari | Mac OS | 8 |
| 05/23/2026 | Armand Denesik | Europe | Chrome | Windows | 29 |
| 07/25/2026 | Rusty Berge | Antarctica | Chrome | Mac OS | 4 |
| 08/10/2026 | Lila Reilly | Africa | Firefox | Android | 26 |
| 06/04/2026 | Braulio Welch | Australia | Firefox | Android | 15 |
| 05/24/2026 | Theron Huels | Asia | Safari | Mac OS | 7 |
| 05/14/2026 | Arthur Reichel | Antarctica | Edge | Windows | 54 |
| 05/29/2026 | Blaise Windler | South America | Firefox | Windows | 21 |
| 05/28/2026 | Eloisa Breitenberg | Australia | Firefox | Windows | 70 |
| 07/07/2026 | Rubye Schinner | South America | Edge | Ubuntu | 13 |
| 08/08/2026 | Gwendolyn Boyer | Asia | Safari | iOS | 6 |
| 07/27/2026 | Melyna Schiller | Antarctica | Internet Explorer | Ubuntu | 8 |
| 06/19/2026 | Michele Harvey | South America | Internet Explorer | Ubuntu | 11 |
| 06/18/2026 | Lois Wolf | Australia | Internet Explorer | Android | 73 |
| 05/13/2026 | Enos Zemlak | Africa | Internet Explorer | Mac OS | 28 |
| 08/02/2026 | Winona Ullrich | Africa | Edge | iOS | 79 |
| Date | Name | Continent | Browser | OS | Visits |
|---|
To allow dragging grid column around, set draggable to true on each column.
There are two parts required to implement column reordering. The first part is dynamic column generation. The onGetColumns callback method
is invoked whenever columnParams change (in this example it's bound to $page.columnOrder) and it should return
the list of columns to be displayed. The list should be in the same format as when assigned to the columns property.
It's important to set a unique key for each column so that grid can correctly associate column meta data (such as column width)
and restore it on each configuration change.
The other part is implementing column drag & drop using onColumnDropTest and onColumnDrop callbacks.
The onColumnDropTest checks if the dragged object contains information required to make a successful column drop.
The logic for changing columns is implemented in onColumnDrop. In this example, columnOrder
and unusedColumns are modified and after that the grid automatically reflects the updated configuration.
<Grid records-bind="$page.records" mod="fixed-layout" scrollable buffered style="height: 500px;" lockColumnWidths columnParams-bind="$page.columnOrder" onGetColumns={(columnOrder) => columnOrder.map((key) => allColumns.find((c) => c.key == key))} onColumnDropTest={(e, instance) => (e.source.type == "grid-column" && e.source.gridInstance == instance) || e.source?.data.type == "unused-column" } onColumnDrop={(e, { store }) => { let key = e.source.type == "grid-column" ? e.source.column.key : e.source.data.key; let { index } = e.target; let columnOrder = store.get("$page.columnOrder"); let at = columnOrder.indexOf(key); let result = columnOrder.filter((c) => c != key); if (at >= 0 && at < index) index--; result = insertElement(result, index, key); store.set("$page.columnOrder", result); store.update("$page.unusedColumns", (unused) => unused.filter((c) => c != key)); }} />