Column reorder

GridControl

Drag a header sideways and drop it where the column should go.

Overview

AllowColumnReorder is on by default: every header is draggable, and while a header is being dragged the grid shows a vertical pipe at the position where the column would land. Drop to the left half of a header to land before it, to the right half to land after it. ColumnReorderPipeColor takes any CSS colour for the pipe; the default is a dark grey. After a drop the grid raises OnLayoutChanged with a GridSettings snapshot whose ColumnOrder lists the fields in their new order, which is what a host saves to restore a user's layout later.

Examples

#Move columns by dragging headers

Drag Priority in front of Model, or Owner to the right of Cost. Only the dragged column moves; sorting, filtering and the search box keep working on the new order.

Example
Razor
C#
Model Community Phase Task Owner Priority Hours Cost Last Updated
A100North RidgeFrameRough carpentry reviewAlex NguyenHigh6.5$845.501/8/2026
A100North RidgeElectricalPanel schedule updateSana PatelHigh4.0$620.001/9/2026
A200Maple HillsPlumbingFixture coordinationMarcus LeeMedium3.0$410.251/10/2026
B150Oak ViewDrywallShear wall punch listDiana OrtizLow2.5$275.001/11/2026
C300Willow ParkPaintColor board approvalJonah KimMedium1.5$190.001/12/2026
C300Willow ParkFinalQC closeout walkAisha BrownHigh5.0$700.001/13/2026
D410River BendConcreteSlab tolerance checkNoah GarciaMedium3.5$535.751/14/2026
D410River BendRoofFlashing detail reviewPriya MenonLow2.0$260.001/15/2026
E520Cedar GroveHVACDuct reroute approvalEthan WalkerHigh4.5$655.401/16/2026
E520Cedar GroveTrimCabinet filler alignmentMina HassanMedium2.0$285.301/17/2026
F610Stone CreekLandscapeIrrigation valve mapLuca RomanoLow1.0$140.001/18/2026
F610Stone CreekFinalWarranty turnover packetGrace MitchellMedium2.8$360.001/19/2026

Drop a header to see the new order here.

Documentation

GridControl parameters for reordering and layout

ParameterTypeDefaultDescription
AllowColumnReorderbooltrueLets a header be dragged onto another header. When off, headers stay draggable only for grouping (with AllowGrouping on) and a drop on a header does nothing.
ColumnReorderPipeColorstring"#2b2b2b"Colour of the vertical pipe that marks where the column will land; any CSS colour, written to the grid's --fx-grid-reorder-pipe-color variable. Blank falls back to the default.
OnLayoutChangedEventCallback<GridSettings>—Fires after a layout change the grid can persist: a header drop, the end of a column or row resize, fit-to-grid and auto-fit, a group added or removed, the header menu's rename, lock and hide commands, a column shown or hidden from the options panel, and OK in the Choose Columns dialog. The argument is a GridSettings snapshot of the whole layout, not just the part that changed; save it to restore the layout later.
PersistenceKeystring?nullOpt-in persistence. When set and an IGridSettingsStore is registered in DI, the grid loads the saved snapshot once it has its columns and saves a new one at every change that raises OnLayoutChanged.

GridSettings

PropertyTypeDefaultDescription
ColumnOrderList<string>?nullFields in display order. Fields missing from the list go to the end.
VisibilityDictionary<string, bool>?nullPer-field visibility; overrides the column's Visible parameter.
WidthsDictionary<string, double>?nullPer-field pixel width from the user's last resize.
FrozenPositionsDictionary<string, FrozenColumnPosition?>?nullPer-field lock: Left or Right pins the column, a null value leaves it scrollable. A null dictionary keeps the markup's layout (settings written by older builds).
HeaderOverridesDictionary<string, string>?nullPer-field header text from the header menu's rename command.
GroupColumnsList<string>?nullFields grouped on, in the order they were dropped on the grouping bar.

IGridSettingsStore

MethodInputsReturnsDescription
LoadAsync()string keyTask<GridSettings?>Returns the saved snapshot for the key, or null when nothing has been saved.
SaveAsync()string key
GridSettings settings
TaskOverwrites whatever was saved under the key.

The host registers one IGridSettingsStore, scoped or singleton; with none registered the grid does not persist. There is no public method that returns or applies a GridSettings on its own; GetState() and SetStateAsync() round-trip the wider GridState, which includes the column layout, and EndUpdateAsync or SuspendRedraw take a final column order (see Column sets). Besides dragging, the header menu's Choose Columns dialog moves a column with its Move Up and Move Down buttons. There is no per-column switch, so a host that must keep one column in place has to turn AllowColumnReorder off.

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.