Problem
The data grid currently only supports row-level selection (selectedRowIndices: Set<Int>). There is no way to visually select an entire column or a vertical range of cells within a column.
Common scenarios where this is needed:
- Copy a subset of values from one column (e.g., rows 5–20 of an
id column) to paste into a WHERE clause or another tool
- Select a column to perform bulk operations (delete column values, batch edit, export just that column)
- Quick comparison: select the same column in two query results side by side
Current workarounds
- Right-click column header → "Copy Column Values" copies the entire column, but there's no visual selection and no way to copy a partial range
- Selecting individual cells one by one isn't possible — only full rows can be multi-selected
Proposed behavior
- Click column header → select (highlight) the entire column; Cmd+C copies all values
- Click a cell, then Shift-click another cell in the same column → select the vertical range between them
- Cmd-click cells → add/remove individual cells to the selection (non-contiguous)
- Selected cells should have a visual highlight, and Cmd+C should copy the selected values (newline-separated or configurable)
Implementation notes (for context)
The current selection model is row-based (Set<Int> at DataGridView.swift:42). Supporting cell selection would likely require a richer model, e.g., Set<CellIndex> where CellIndex = (row: Int, column: Int), plus updates to:
SortableHeaderView (header click → select instead of / in addition to sort)
KeyHandlingTableView (Shift/Cmd-click routing)
DataGridCoordinator (selection sync)
This is similar to how Excel, DataGrip, and DBeaver handle column/range selection in their data grids.
Problem
The data grid currently only supports row-level selection (
selectedRowIndices: Set<Int>). There is no way to visually select an entire column or a vertical range of cells within a column.Common scenarios where this is needed:
idcolumn) to paste into a WHERE clause or another toolCurrent workarounds
Proposed behavior
Implementation notes (for context)
The current selection model is row-based (
Set<Int>atDataGridView.swift:42). Supporting cell selection would likely require a richer model, e.g.,Set<CellIndex>whereCellIndex = (row: Int, column: Int), plus updates to:SortableHeaderView(header click → select instead of / in addition to sort)KeyHandlingTableView(Shift/Cmd-click routing)DataGridCoordinator(selection sync)This is similar to how Excel, DataGrip, and DBeaver handle column/range selection in their data grids.