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">
<GridColumns>
...
</GridColumns>
</EjsGrid>
@code{
...
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.
...
}).ToList();
}
...
}
|
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.
- Share with us the details of the script error you are facing.
- Share the details about the type of filter you are using.
- Share the sample which you have tried form your side.
Please get back to us if you need further assistance.
Regards,
Renjith Singh Rajendran.