FilterType.Excel not working On Foreign Key Column
I want to use the "Text Filter Starts With" on the Foreign Key Column "Player". My name "Larry White" is in the list, but the grid returns no rows when I type "Lar". Same using "Contains".
Attachment: Points_39a8c176.zip
Hi Larry,
We are unable to reproduce the reported issue when attempting to reproduce the
issue. For your reference, we have attached a simple sample and screenshot. To
further address the reported problem, we require some additional clarification
from your end. Please provide the details below to help us proceed:
- To analyze the reported issue, could you please provide a simple and reproducible sample that demonstrates the problem? This will assist us in identifying the issue more efficiently and providing a resolution.
- Could you please share us the video demonstrating of the issue replication Steps?
- Alternatively, could you share your attempt to replicate the issue using the attached simple 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/LXLTWMNzUHeMUZUL?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5
Additionally, we noticed that you have enabled both paging and infinite
scrolling features simultaneously. We would like to clarify that only one of
these features should be used at a time, as this is the default behavior of the
grid.
|
<SfGrid DataSource="@FilteredPoints" Toolbar="@(new List<string>() {"Edit", "Delete", "Update", "Cancel", "Search"})" AllowPaging=true EnableStickyHeader=true AllowFiltering="true" AllowSorting="true" AllowResizing="true" AllowGrouping="true" EnableInfiniteScrolling="true" Height="400" RowHeight="20">
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode=" Syncfusion.Blazor.Grids.EditMode.Normal" ShowDeleteConfirmDialog="true" ShowAddNewRow="true"> </GridEditSettings>
<GridGroupSettings EnableLazyLoading="true"> </GridGroupSettings>
<GridPageSettings PageSizes="false" PageSize="100"> </GridPageSettings> |
Regards,
Prathap Senthil
I found the issue but do not know how to work around it.
FullName is a computed column. When I change the foreign column to LastName, all of the filtering works as expected.
using System.ComponentModel.DataAnnotations;
namespace Golf.Quota.Models
{
public class Player
{
public int Id { get; set; }
[Required(ErrorMessage = "Last Name Is Required")]
public string? LastName { get; set; }
[Required(ErrorMessage = "First Name Is Required")]
public string? FirstName { get; set; }
public string FullName => $"{FirstName} {LastName}";
public int GroupId { get; set; }
}
}
As a work around, I have added FullName to my SQL table as a computed column. Now, it is being loaded from the db and the excel searching is working.
Based on your update, we suspect that the issue was
caused by using 'FullName' as a computed column (template), which affected
searching functionality. We are glad to hear that you have resolved the issue
by updating the column name in the database. Please feel free to get back to us
if you have any further questions.
- 4 Replies
- 2 Participants
-
LA Larry
- Nov 3, 2024 03:05 PM UTC
- Nov 6, 2024 11:54 AM UTC