Blazor Server Search Gets No Results

Hello!

Using .NET 8.0 and 25.1.35 Syncfusion

We are using Blazor Server and have set up some datagrids. Data is successfully pulled and shows up, but when I search, it says "No Results Found".

Here is a code snippet:

 

    <SfGrid DataSource="CourseVms" AllowPaging="true" Toolbar=@ToolbarItems>

        <GridPageSettings PageSize="15"></GridPageSettings>

        <GridColumns>

            <GridColumn HeaderText="Actions" Width="150">

                <Template>

                    @{

                        var courseVm = (context as DataWithActionsViewModel<Course>);

                        var link = $"/Admin/Courses/Edit/{courseVm.Data.Id}";

                    }

                    <a rel='nofollow' href="@link">Edit</a>

                    <button type="button" class="archiveLink btn btn-link" @onclick='@(courseVm.GetAction("archive"))'>Archive</button>

                </Template>

            </GridColumn>

            <GridColumn Field="Data.Id" HeaderText="ID" Width="100"></GridColumn>

            <GridColumn Field="Data.SubjectArea.Code" HeaderText="Subject Code" Width="150"></GridColumn>

            <GridColumn Field="Data.CourseNumber" HeaderText="Course Number" Width="150"></GridColumn>

            <GridColumn Field="Data.Title" HeaderText="Title" AllowSearching="true"></GridColumn>

            <GridColumn Field="Data.IsActive" HeaderText="Active?" Width="100"></GridColumn>

        </GridColumns>

    </SfGrid>


@code {

    private IEnumerable<DataWithActionsViewModel<Course>> CourseVms = [];

    public List<Course> Courses { get; set; }

    private List<string> ToolbarItems = new List<string>() { "Search" };


    protected override void OnInitialized()

    {

        LoadCourses();

    }


Paging works fine as well. Here is a screenshot:
Image_6543_1714671012065

You can see that Writing is in the column for 'Title' which has AllowSearch on. 
Here is after searching:
Image_8922_1714671066731


1 Reply

PS Prathap Senthil Syncfusion Team May 3, 2024 03:04 PM UTC

Hi Smith,

Before proceeding with the reporting of the concern, we require some additional clarification from your end. Please share the following details to proceed further:

  • Could you please share the Model class with us?
  • Could you please explain why you are using the DataWithActionsViewModel instead of directly binding to a List<T>?
  • To analyze the reported issue, could you please provide a simple and reproducible sample with duplicate data that demonstrates the problem? This will assist us in identifying the issue more efficiently and providing a resolution.

The details requested above will be very helpful in validating the reported query on our end and providing a solution as soon as possible. Thanks for your understanding.

Regards,
Prathap Senthil


Loader.
Up arrow icon