Wrong work of grid.SelectedRecords

Hi. SelectedRecords gives data without taking into account filtering results:


3 Replies 1 reply marked as answer

RN Rahul Narayanasamy Syncfusion Team January 19, 2021 02:05 PM UTC

Hi Constantine, 

Greetings from Syncfusion. 

Query: Wrong work of grid.SelectedRecords 

We have validated your query and checked the reported problem at our end. We could not reproduce the problem. The correct number of records are shown after performing filtering operation. Find the below code snippets and sample for your reference. 

 
<button @onclick="Select">Get Selected records</button> 
 
<div>Selected Count - @Count</div> 
 
<SfGrid @ref="Grid" DataSource="@Orders" AllowFiltering="true" AllowSelection="true" AllowPaging="true" Height="315"> 
    <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Menu"></GridFilterSettings> 
    <GridSelectionSettings Type="SelectionType.Multiple"></GridSelectionSettings> 
    <GridColumns> 
        <GridColumn Type="ColumnType.CheckBox" Width="50"></GridColumn> 
        ... 
    </GridColumns> 
</SfGrid> 
 
@code{ 
    SfGrid<Order> Grid; 
    public List<Order> Orders { get; set; } 
    public int Count { get; set; } = 0; 
 
    . . . 
 
    public async Task Select() 
    { 
        var rec = await Grid.GetSelectedRecords(); 
        Count = rec.Count(); 
    } 
} 


Also, we need some information regarding the reported problem. Could you please share the below details. It will be helpful to validate and provide a better solution. 

  • Full Grid code snippets.
  • Reproduce the problem in the provided sample and revert back to us.
  • Syncfusion NuGet version details.
  • Whether did you face the problem with PersistSelection property enabled?

Regards, 
Rahul 



CO Constantine January 20, 2021 07:06 AM UTC

Yes, such behavior occurs when PersistSelection is true.



Attachment: BlazorAppGridSelection_fb0670a9.zip


RN Rahul Narayanasamy Syncfusion Team January 21, 2021 01:27 PM UTC

Hi Constantine, 

Thanks for sharing the details. 

Query: Wrong work of grid.SelectedRecords 

We have validated your query and we have considered your reported problem as a bug and logged the defect report “Incorrect selected records are returned while clicking CheckAll checkbox after filtering with persistSelection”. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming patch release which is expected to be rolled out on or before end of February, 2021. 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.     
     
     
Until then we appreciate your patience. 

Regards, 
Rahul 


Marked as answer
Loader.
Up arrow icon