We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filtering not working when cell is null

Thread ID:





147067 Aug 30,2019 02:16 PM UTC Sep 3,2019 08:57 AM UTC Blazor 1
Tags: Grid
Ivan Petrov
Asked On August 30, 2019 02:16 PM UTC

If one of the columns contains a cell that is null and you want to filter by the given column there is an error.

Renjith Singh Rajendran [Syncfusion]
Replied On September 3, 2019 08:57 AM UTC

Hi Ivan, 

Thanks for contacting Syncfusion support. 

We suggest you to set the “Type” property for the corresponding column to overcome the problem you are facing.  
By default the type for the corresponding column type will be defined based on first record value of the particular column’s data. If the first row data for the column is empty then the type for the column will not be set by default and so the script error will occurred when try perform filter in Grid.  

So to overcome the problem, kindly specify the type for the column using Type property. Please refer the code below, 

<EjsGrid @ref="Grid" @ref:suppressField DataSource="@Orders" AllowFiltering="true" AllowPaging="true" Height="315"> 
       <GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Type="number" Width="120"></GridColumn> 

   protected override void OnInitialized() 
        Orders = Enumerable.Range(0, 4).Select(x => new Order() 
            OrderID = 1000 + x, 
            CustomerID = (new int?[] { null,8, 9, 10, 11 })[x], //null value for first row data, so it is must to define the Type for “CustomerID” column. 

We are also attaching a sample for your convenience, please download the sample from the link below, 
If you are still facing difficulties, kindly get back to us with the following details for better assistance. 
  1. Share with us the details of the script error you are facing.
  2. Share the details about the type of filter you are using.
  3. Share the sample which you have tried form your side.

Please get back to us if you need further assistance.  

Renjith Singh Rajendran. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon