Add formula (calculated) columns specification - #17551
Draft
igdmdimitrov with Copilot wants to merge 4 commits into
Draft
Add formula (calculated) columns specification#17551igdmdimitrov with Copilot wants to merge 4 commits into
igdmdimitrov with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: igdmdimitrov <49060557+igdmdimitrov@users.noreply.github.com>
Co-authored-by: igdmdimitrov <49060557+igdmdimitrov@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add formula (calculated) columns for the data grids
Add formula (calculated) columns specification
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The grid has no concept of a derived column value —
formatteronly changes rendering, and pre-computing into the data source cannot support end-user authoring. Per the instruction on the issue, this is a specification only: no library code is changed.Adds
specs/Formula-Columns-Specification.md, following the structure of the existing wiki specifications (Tree, Group By, Summaries, Column Pinning, Excel Style Filtering). The filename matches a wiki page slug so the content can be transferred verbatim.Contents
#DIV/0!,#VALUE!,#REF!,#NAME?,#NUM!,#CIRCULAR!).resolveNestedPath(record, columnFieldPath(field))call site and the change each needs. This is the central design point: it is what makes sorting, filtering, grouping, merging, summaries, search, clipboard and export work without per-column strategy code.igniteui-angular/core(no Angular deps); editor in a new opt-ingrids/formula-editorentry point reached via an injection token, sogrids/corekeeps no static import. Dependency graph, invalidation scopes,WeakMapmemoization keyed by record identity + formula version, zoneless (NG0100) constraints.igx-grid-toolbar-advanced-filtering, autocomplete viaIgxAutocompleteDirective, error presentation, keyboard/ARIA, 30 resource strings, theming per the query-builder layout.IgxFormulaEngine, editor and toolbar action, plus interfaces and theIColumnStateadditions.Two findings from the source that shaped the design
IgxSorting.getFieldValuedoes not receivegrid, unlikeFilteringStrategy.getFieldValue. The spec documents threading it through via an arrow closure —bind()on an arrow function is a no-op, so customISortingStrategyimplementations callingvalueResolver.bind(this)keep working.DefaultSortingStrategy.compareValuesfalls through to the JS relational operators, which returnfalsein both directions for an object operand — an error value would compare equal to everything rather than sorting last. The spec calls for an explicitFormulaErrorguard ahead of the nullish checks, with a regression test.Proposed surface
Note on API style
Members are described in the decorator style, and
formulaFntypes its parameter asany. Both match the surrounding code rather than the newer signal conventions:grids/corehas 1012@Input()against 22 signalinput()s (all signal usage is inchat/andgrids/lite/), the mirrored advanced-filtering dialog and toolbar action both use@Input(), the WC/Blazor code-gen keys off the decorator annotations, andformulaFndeliberately parallelsformatter?: (value: any, rowData?: any) => anyon a non-genericColumnType. The spec states this explicitly and notes the translation ifgrids/coremigrates later; the return type is tightened to aFormulaValueunion.Open for discussion: the file lands in a new top-level
specs/folder (there is no existingdocs/) — happy to relocate or move it straight to the wiki.