Hello team!
I have problems selecting all records in a DataGrid when there are many results. I mean, I have a query with a 10,000 results cap, but if the user doesn't apply filters and clicks directly on the select all box, the response time is too long.
Is there any way to select only the results of the page? That is, if I limit the number of PageSize to 40 (for example), that when I click on this box, only these 40 are selected?
Currently, my code is:
Translated with DeepL.com (free version)
<RadzenDataGridColumn Width ="60px" Sortable ="false" Filterable ="false">
<HeaderTemplate >
<RadzenCheckBox TabIndex ="-1" TriState ="false" TValue ="bool?" InputAttributes ="@(new Dictionary<string,object>(){ { "aria-label", "Select all items" }})"
Value ="@(seleccionOFCropu == null || seleccionOFCropu?.Any() != true ? false : !pmsMsOrdens.All(i => seleccionOFCropu.Contains(i)) ? null : pmsMsOrdens.Any(i => seleccionOFCropu.Contains(i)))"
Change ="@(args => seleccionOFCropu = args == true ? grid0.View.ToList() : null)" />
</HeaderTemplate >
<Template Context ="data">
<RadzenCheckBox TabIndex ="-1" TriState ="false" Value ="@(seleccionOFCropu != null && seleccionOFCropu.Contains(data))" InputAttributes ="@(new Dictionary<string,object>(){ { "aria-label", "Select item" }})"
TValue ="bool" Change =@(args => { if(!allowRowSelectOnRowClick) { grid0.SelectRow(data); }}) />
</Template >
</RadzenDataGridColumn >
One more time, thanks a lot for your time.