Skip to content

fix/numeric columns sorting as text instead of numbers#732

Merged
erikdarlingdata merged 1 commit intoerikdarlingdata:devfrom
jakemorgangit:fix/treat-numeric-values-as-numbers
Mar 27, 2026
Merged

fix/numeric columns sorting as text instead of numbers#732
erikdarlingdata merged 1 commit intoerikdarlingdata:devfrom
jakemorgangit:fix/treat-numeric-values-as-numbers

Conversation

@jakemorgangit
Copy link
Copy Markdown

What does this PR do?

DataGrid columns displaying sizes, row counts, durations, and percentages were stored as formatted strings, causing lexicographic sort order (e.g. "9.8" before "87"). Added numeric SortMemberPath companion properties using the same pattern as the existing AutoGrowthSort/VlfCountSort, and wired them up in XAML across both Dashboard and Lite editions.

  • IndexCleanup summary/detail grids: 22 columns each (Size GB, Rows, etc.)
  • FinOps recommendations: EstMonthlySavingsDisplay
  • Query snapshots: Duration, TranLogWrites
  • Live queries: ElapsedTimeFormatted
  • Running jobs: CurrentDurationFormatted, AvgDurationFormatted
  • Deadlock details: WaitTimeFormatted
  • Running jobs: PercentOfAverageFormatted

DataGrid columns that display numeric values (sizes, row counts, durations, percentages, costs) were stored as formatted strings, so WPF sorted them lexicographically instead of numerically - e.g., "9.8" sorted before "87.9" because "9" > "8" as a character. This adds numeric companion properties and wires them via SortMemberPath, following the existing AutoGrowthSort / VlfCountSort pattern.

Which component(s) does this affect?

  • Full Dashboard
  • Lite Dashboard
  • Lite Tests
  • SQL collection scripts
  • CLI Installer
  • GUI Installer
  • Documentation

How was this tested?

  • Both projects build with zero errors (dotnet build Dashboard/Dashboard.csproj and dotnet build Lite/PerformanceMonitorLite.csproj)
  • Verified sort behavior by clicking Size GB and Rows column headers - values now order numerically (e.g., 7.0, 8.4, 9.8, 68.6, 78.8, 87.9, 99.5) instead of alphabetically

Checklist

  • I have read the contributing guide
  • My code builds with zero warnings (dotnet build -c Debug)
  • I have tested my changes against at least one SQL Server version
  • I have not introduced any hardcoded credentials or server names

DataGrid columns displaying sizes, row counts, durations, and percentages
were stored as formatted strings, causing lexicographic sort order (e.g.
"9.8" before "87"). Added numeric SortMemberPath companion properties
using the same pattern as the existing AutoGrowthSort/VlfCountSort, and
wired them up in XAML across both Dashboard and Lite editions.

- IndexCleanup summary/detail grids: 22 columns each (Size GB, Rows, etc.)
- FinOps recommendations: EstMonthlySavingsDisplay
- Query snapshots: Duration, TranLogWrites
- Live queries: ElapsedTimeFormatted
- Running jobs: CurrentDurationFormatted, AvgDurationFormatted
- Deadlock details: WaitTimeFormatted
- Running jobs: PercentOfAverageFormatted

Made-with: Cursor
@erikdarlingdata erikdarlingdata merged commit b9166ef into erikdarlingdata:dev Mar 27, 2026
3 checks passed
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