-
@code {
private HashSet selectedEmployees = new();
diff --git a/Havit.Blazor.Documentation/Pages/Components/HxGridDoc/HxGrid_Documentation.razor b/Havit.Blazor.Documentation/Pages/Components/HxGridDoc/HxGrid_Documentation.razor
index 4fec2f658..8ac28d5b4 100644
--- a/Havit.Blazor.Documentation/Pages/Components/HxGridDoc/HxGrid_Documentation.razor
+++ b/Havit.Blazor.Documentation/Pages/Components/HxGridDoc/HxGrid_Documentation.razor
@@ -122,21 +122,22 @@
Enable multi-row selection for users by setting @nameof(HxGrid.
The selected items can be accessed via the @nameof(HxGrid parameter, which is bindable.
+
Note that @nameof(HxGrid.SelectedDataItems) only includes visible items.
By default, items are removed from the selection when they become unrendered (for example, after paging, sorting, etc.).
However, this behavior can be modified by setting the @nameof(HxGrid.PreserveSelection)="true" parameter,
- which ensures that selected items are preserved across data operations such as paging, sorting or manual invocation of RefreshDataAsync.
+ which ensures that selected items are preserved across data operations such as paging, sorting, or manual invocation of RefreshDataAsync.
The "select/deselect all" checkbox operates only on visible records and adds/removes them from the selection accordingly.
Non-visible items (e.g., from other pages) are not affected by this operation.
- Multi-row selection is not compatible with @nameof(GridContentNavigationMode.InfiniteScroll).
- This design decision might change in the future.
+ When using @nameof(GridContentNavigationMode.InfiniteScroll), @nameof(HxGrid.PreserveSelection)="true" is required for multi-row selection to work.
+ Attempting to use @nameof(HxGrid.MultiSelectionEnabled)="true" without enabling PreserveSelection will result in an exception. Additionally, the "select/deselect all" checkbox is intentionally hidden in this mode,
+ as the grid does not have access to all data to reliably perform this operation. For more details, see ticket #950.
-
diff --git a/Havit.Blazor.TestApp/Havit.Blazor.TestApp.Client/HxGridTests/HxGrid_InfiniteScroll_MultiSelectionEnabled_Test.razor b/Havit.Blazor.TestApp/Havit.Blazor.TestApp.Client/HxGridTests/HxGrid_InfiniteScroll_MultiSelectionEnabled_Test.razor
new file mode 100644
index 000000000..eae7ad5a9
--- /dev/null
+++ b/Havit.Blazor.TestApp/Havit.Blazor.TestApp.Client/HxGridTests/HxGrid_InfiniteScroll_MultiSelectionEnabled_Test.razor
@@ -0,0 +1,45 @@
+@page "/HxGrid_InfiniteScroll_MultiSelectionEnabled"
+@rendermode InteractiveServer
+@inject IDemoDataService DemoDataService
+
+
+
+
+
+
+
+
+
+
+
+
+
+