Filter multiple conditions in excel filter grid

Hello I have a column with the excel type of filter. I would like these same conditions to be present in the filter

for example have a checkbox that filter for No Data based on the same conditions.

Similar, a check box with Phone

and finally a number of checkboxes for each device Id.

How can I achieve this custom filter?

    <GridColumn Field=@nameof(Model.StartDevice.DeviceId) HeaderText="Device">
        <Template Context="context">
            @if (context is Model v)
            {
                if (v.StartDevice.DeviceId.IsNullOrWhiteSpace())
                {
                    <span>No Data</span>
                }
                else if (v.StartDevice.DeviceType == Device.Phone)
                {
                    <span>Phone</span>
                }
                else
                {
                    @v.StartDevice.DeviceId
                }
            }
        </Template>
    </GridColumn>



1 Reply 1 reply marked as answer

MS Monisha Saravanan Syncfusion Team July 18, 2022 02:35 PM UTC

Hi Pavel,


Greetings from Syncfusion support.


Query: “I have a column with the excel type of filter. I would like these same conditions to be present in the filter. How can I achieve this custom filter?”


We suspect that you need to customize the filter by using certain conditions. If so we suggest you to achieve your requirement by using FilterItemTemplate feature of DataGrid. By using filter template we can customize our own filter. Kindly check the attached documentation for your information.


Reference: https://blazor.syncfusion.com/documentation/datagrid/excel-like-filter#filter-item-template


If the reported query is not resolved then kindly share the below details to validate further at our end.


  1. Share us some more details about your exact query.
  2. Share us the video demonstration of the issue with exact replication.
  3. Share us the entire Grid code snippet.
  4. If possible kindly share us the issue reproduceable sample.


The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.


Regards,

Monisha


Marked as answer
Loader.
Up arrow icon