WarUI

Autosize All Columns Programmatically

GRID-A08-F03P0baselinePlanned

A method sizes every column, or a chosen subset, to its content in one pass. Applications can call it after data loads so first-time viewers get sensible widths.

Planned. This page shows the specification from issue #185. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid with 12 columns at uniform width, plus three action buttons.

Expected behavior

All targeted columns resize in a single layout pass. One batched columnResized event fires, listing every affected column. Columns that are not targeted keep their widths.

Planned API surface

api.autosizeColumns(columnIds?, options?)api.autosizeAllColumns(options?)options.skipHeaderoptions.skipPinnedevent:columnResized

Acceptance criteria

  • Exactly one columnResized event fires per call, and its columns array lists every changed column. (pending)
  • Columns that are not targeted keep their widths. (pending)
  • The call completes in one layout reflow, verified by instrumentation in tests. (pending)
  • Calling the method before the grid is rendered is queued and applied after the first render. (pending)