RowSelected Resets Filter Results
I have a Blazor project and ! Fm using the sfGrid control. I have a filter at the top and a RowSelected Grid Event. When I filter the main results and then click a row which fires the RowSelected event, the filtered results reset back to the original rows. Is there a way to stop it from resetting?
<SfGrid @ref="contactGrid" Name="GridOne" DataSource="@ComplianceContacts"
AllowScrolling="true" AllowPaging="true" AllowSorting="true"
AllowFiltering="true"
FilterSettings="@(new() { Type = Syncfusion.Blazor.Grids.FilterType.Menu })">
<GridEvents RowSelected="OnUserRowSelected" TValue="ComplianceContactsModel"></GridEvents>
<GridPageSettings PageSize="13"></GridPageSettings>
<GridColumns>
<GridColumn Field="@nameof(ComplianceContactsModel.ContactID)" HeaderText="Contact ID"
Width="150" AllowFiltering="true"
FilterSettings="new() { Operator = Operator.Contains }">
<Template>
<span>@((context as ComplianceContactsModel).ContactID)</span>
</Template>
</GridColumn>
<GridColumn Field="@nameof(ComplianceContactsModel.Contact)" HeaderText="Contact Name"
Width="150" AllowFiltering="true"
FilterSettings="new() { Operator = Operator.Contains }">
<Template>
<span>@((context as ComplianceContactsModel).Contact)</span>
</Template>
</GridColumn>
</GridColumns>
</SfGrid>
private async void OnUserRowSelected(RowSelectEventArgs<ComplianceContactsModel> args)
{
if (args.Data != null)
{
contactId = int.Parse(args.Data.ContactID);
contactname = args.Data.Contact;
}
}
Hi Patrick Murray,
We are unable to reproduce the reported issue. Filtering works initially, but
selecting a row resets the grid and clears the filter. For your reference, we
have attached a simple sample and Gif file. To further investigate the issue,
we need additional clarification from your side. Please provide the following
details to help us proceed:
- Could you please share the video demonstrations of the issue with replication steps?
- To help us analyze the issue, could you provide a simple reproducible sample that demonstrates the problem? This will allow us to identify the issue more effectively and provide a resolution. Alternatively, you could share your attempt to replicate the issue using the attached sample
The
information you provide will be very helpful in validating the reported query
on our end and in providing a solution as quickly as possible. Thank you for
your understanding.
Sample:https://blazorplayground.syncfusion.com/embed/hjBfWVMHzGvMvmSi?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5
Regards,
Prathap Senthil
Attachment: GIF_GridFilter_a1dda606.zip
- 1 Reply
- 2 Participants
-
PM Patrick Murray
- Dec 15, 2024 12:31 PM UTC
- Dec 16, 2024 01:43 PM UTC