Skip to content

[01415] Fix DataTable footer concatenated currency formatting#2911

Merged
nielsbosma merged 1 commit intomainfrom
plan-01415-Ivy-Framework
Apr 2, 2026
Merged

[01415] Fix DataTable footer concatenated currency formatting#2911
nielsbosma merged 1 commit intomainfrom
plan-01415-Ivy-Framework

Conversation

@nielsbosma
Copy link
Copy Markdown
Contributor

Summary

Fixed the DataTable footer to properly format aggregate values using the column's FormatStyle, Currency, and Precision settings. Previously, the Footer() method used raw ToString() on aggregate results, causing currency columns to display concatenated raw strings (e.g. $10,543.56$150,587.95) instead of formatted sums like $161,131.51.

Changes

  • Backend fix:

    • src/Ivy/Views/DataTables/DataTableBuilder.cs — Added FormatFooterValue and GetCultureForCurrency private static methods; updated both Footer() overloads to use them.
  • Tests:

    • src/Ivy.Tests/Views/DataTables/DataTableFooterFormatTests.cs — New test class with 5 tests covering Currency, Percent, Decimal, no-format passthrough, and multiple aggregates.

API Changes

None. The fix is internal to DataTableBuilder<TModel> — the public Footer() API is unchanged but now produces correctly formatted output.

Commits

  • 7ff982b [01415] Fix DataTable footer to format currency/number aggregates

The Footer() method was building footer strings via string interpolation
without applying the column's FormatStyle, Currency, or Precision settings.
This caused currency columns to display concatenated raw values (e.g.
"$10,543.56$150,587.95") instead of a properly formatted sum.

Added FormatFooterValue helper that applies the column's number formatting
(Currency, Percent, Decimal) to aggregate results, and GetCultureForCurrency
to resolve ISO currency codes to the correct CultureInfo for formatting.
@nielsbosma nielsbosma merged commit 2740999 into main Apr 2, 2026
9 checks passed
@nielsbosma nielsbosma deleted the plan-01415-Ivy-Framework branch April 2, 2026 08:32
@artem-ivy-ai
Copy link
Copy Markdown
Collaborator

Deploy timed out

I'm preparing your docs & samples for this PR. I'll update the comment as Sliplane reports progress.

Logs

No terminal state received from Sliplane after 30 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants