how to search on a grid using a certain table value

I would to show a sfgrid with a value from a database as follows:

I have a database with names such as Philips and Siemens. How can I show only one of these in as grid?


3 Replies

PS Prathap Senthil Syncfusion Team August 23, 2024 06:18 PM UTC

Hi tom,

Greetings from Syncfusion,

Based on your requirement, we suggest using the initial filter feature to achieve your goal. We have already documented this topic. Kindly refer to the documentation below for more details.

https://blazor.syncfusion.com/documentation/datagrid/filtering#initial-filter


Regards,
Prathap Senthil



TO tom August 23, 2024 11:13 PM UTC

Do you have a example that I can look at?



PS Prathap Senthil Syncfusion Team August 26, 2024 01:27 PM UTC

Based on your query, we have created a simple sample for your reference. Kindly refer to the link below.

 

<SfGrid DataSource="@GridData" AllowFiltering="true" Height="273px">

    <GridFilterSettings>

        <GridFilterColumns>

            <GridFilterColumn Field="ShipCity" MatchCase=false Operator="Syncfusion.Blazor.Operator.Equal"  Value="@ShipCityValue"></GridFilterColumn>

        

        </GridFilterColumns>

    </GridFilterSettings>

    <GridColumns>

</SfGrid>


Sample: https://blazorplayground.syncfusion.com/embed/rjVpNFBxpWhoTKvo?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5


Loader.
Up arrow icon