Skip to content

Formatted duration columns sort alphabetically instead of numerically #455

@erikdarlingdata

Description

@erikdarlingdata

Problem

Several DataGrid columns that display formatted durations (mixing units like "450 ms", "1.2 s", "3.5 min") sort alphabetically instead of numerically because they lack a SortMemberPath pointing to the underlying numeric property.

PR #452 fixed this for the Collection Health tabs. The same issue exists in other grids:

Affected columns

File Column Formatted Property Numeric Property
Lite/Controls/ServerTab.xaml ~line 945 Wait Time (waits grid) WaitTimeFormatted WaitTimeMs
Lite/Controls/ServerTab.xaml ~line 1065 Wait Time (latches grid) WaitTimeFormatted WaitTimeMs
Lite/Controls/ServerTab.xaml ~line 1186 Current Duration (QS anomalies) CurrentDurationFormatted CurrentDurationSeconds
Lite/Controls/ServerTab.xaml ~line 1189 Avg Duration (QS anomalies) AvgDurationFormatted AvgDurationSeconds
Lite/Controls/ServerTab.xaml ~line 1192 P95 Duration (QS anomalies) P95DurationFormatted P95DurationSeconds
Lite/Controls/ServerTab.xaml ~line 1406 Total Wait (daily summary) TotalWaitFormatted TotalWaitTimeSec
Lite/Windows/WaitDrillDownWindow.xaml ~line 83 Elapsed Time ElapsedTimeFormatted (string from DB — may need a numeric backing property added)

Fix

Same pattern as PR #452 — add SortMemberPath="<NumericProperty>" to each DataGridTextColumn. For ElapsedTimeFormatted, a numeric backing property may need to be added to the model first since it's currently stored as a pre-formatted string.

Context

Found during review of PR #452 by @dphugo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions