From da6a2453ae25993dcb5355065d8cafeb2e289f83 Mon Sep 17 00:00:00 2001 From: rferraton <16419423+rferraton@users.noreply.github.com> Date: Sun, 3 May 2026 10:37:46 +0200 Subject: [PATCH] switch the default grid GroupBy from "None" to "Query Hash" and don't open the first line by default --- .../Controls/QueryStoreGridControl.axaml | 4 ++-- .../Controls/QueryStoreGridControl.axaml.cs | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml index 3a9f670..6161d5b 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml @@ -70,7 +70,7 @@ + SelectedIndex="1" SelectionChanged="GroupBy_SelectionChanged"> @@ -150,7 +150,7 @@ - + _groupedRootRows = new(); // top-level rows for grouped mode public event EventHandler>? PlansSelected; @@ -89,6 +89,7 @@ public QueryStoreGridControl(ServerConnection serverConnection, ICredentialServi // Auto-fetch with default settings on connect Avalonia.Threading.Dispatcher.UIThread.Post(() => { + ReorderColumnsForGroupBy(); Fetch_Click(null, new RoutedEventArgs()); _initialOrderByLoaded = true; }, Avalonia.Threading.DispatcherPriority.Loaded); @@ -311,12 +312,7 @@ private async System.Threading.Tasks.Task FetchGroupedPlansAsync( LoadButton.IsEnabled = true; SelectToggleButton.Content = "Select All"; - // Auto-expand the first root row to the deepest level - if (rootRows.Count > 0) - { - var first = rootRows[0]; - ExpandRowRecursive(first); - } + UpdateStatusText(); UpdateBarRatios();