- Nesting.CellSelect lets you configure a grid in the native Windows client so users can select an individual cell or a rectangular range of cells instead of selecting an entire row.
Use CellSelect in a native Windows grid
Set the CellSelect tagged value on the Nesting that defines the grid.
- In MDriven Designer, open the ViewModel that contains the grid.
- Select the Nesting that holds the grid columns.
- Add the tagged value
CellSelectto that Nesting. - Run the ViewModel in the native Windows client and select a cell or a box of cells in the grid.
For example, in an order-line grid with columns for product, quantity, and price, CellSelect lets a user select the Quantity cell for one order line, or drag across Quantity and Price cells for several lines, without selecting the full order-line rows.
Client availability
| Client | Cell selection behavior |
|---|---|
| Native Windows client | CellSelect enables selection of an individual cell or a rectangular box of cells.
|
| Web client | Cell selection is not available. The web client does not support CellSelect.
|
Do not rely on cell selection when the same ViewModel must provide this interaction in the web client. Design the web-client interaction around row selection or another supported control instead.
Cell selection and row selection
CellSelect changes what the user can select in the grid; it does not document multi-row selection behavior. Use Nesting.MultiSelect when users must select multiple objects (rows) and use the maintained vSelected_ collection in OCL actions.
The ViewModel maintains vCurrent_ for the object the user last focused or clicked. When you need to act on the current object or selected rows, see VCurrent and vSelected.
For example, use MultiSelect to let a user select several order lines and run an action for those lines. Use CellSelect when the native Windows user needs spreadsheet-like selection of particular grid cells; it is not a replacement for MultiSelect.
Related grid settings
Cell selection is independent of whether a grid can be edited. To configure editing behavior and cell-level read-only behavior where supported, see Edit in Grid. To configure client-side sorting, see Nesting.ClientSortable.
