If you freely search the input field displayed with "Allow Filtering = true", an error will occur if the search is caught in the column with "EditType.DropDownEdit" specified.

If you freely search the input field displayed with "Allow Filtering = true", an error will occur if the search is caught in the column with "EditType.DropDownEdit" specified. 

use code:

<SfGrid DataSource="List" AllowTextWrap="true" AllowFiltering="true" AllowSorting="true" AllowPaging="true" Toolbar="@(new List<string>() { "Edit", "Delete" })">
    <GridSelectionSettings Mode="Syncfusion.Blazor.Grids.SelectionMode.Row" EnableToggle="false" EnableSimpleMultiRowSelection="false" />
    <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.CheckBox" />
    <GridEvents OnActionBegin="ActionBegin" OnActionComplete="ActionComplete" TValue="DataValue" />
    <GridPageSettings PageCount="5" PageSize="8" />
    <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" ShowDeleteConfirmDialog="true" AllowNextRowEdit="false" Mode="@EditMode.Dialog">
        <HeaderTemplate>Data Value Information</HeaderTemplate>
    </GridEditSettings>
    <GridColumns>
        <GridColumn Field="@nameof(DataValue.Id)" HeaderText="@nameof(DataValue.Id)" AllowEditing="@IsAddMode" IsPrimaryKey="true" EditType="EditType.NumericEdit"
                    EditorSettings="@(new NumericEditCellParams { Params = new() { CssClass = "e-required", Min = 1, ShowClearButton = true, ShowSpinButton = true, } })"
                    ValidationRules="@(new () { Required = true, })" />
        <GridColumn Field="@nameof(DataValue.Name)" HeaderText="@nameof(DataValue.Name)" EditType="EditType.DefaultEdit"
                    EditorSettings="@(new StringEditCellParams { Params = new() { CssClass = "e-required", ShowClearButton = true, } })"
                    ValidationRules="@(new () { Required = true, })" />
        <GridColumn Field="@nameof(DataValue.Key1)" HeaderText="@nameof(KeyValue1)" DataSource="KeySource1" EditType="EditType.DropDownEdit"
                    ForeignKeyField="@nameof(KeyValue1.Key)"
                    ForeignKeyValue="@nameof(KeyValue1.Name)"
                    EditorSettings="@(new DropDownEditCellParams{ Params = new() { ShowClearButton = true, PopupWidth="auto"} })" />
        <GridColumn Field="@nameof(DataValue.Key2)" HeaderText="@nameof(KeyValue2)" DataSource="KeySource2" EditType="EditType.DropDownEdit"
                    ForeignKeyField="@nameof(KeyValue2.Key)"
                    ForeignKeyValue="@nameof(KeyValue2.Name)"
                    EditorSettings="@(new DropDownEditCellParams{ Params = new() { ShowClearButton = true, PopupWidth="auto" } })" />
    </GridColumns>
</SfGrid>


probrem:
column KeyValue1 , KeyValue2
input hit text -> Unhandled exception rendering component: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
 at Syncfusion.Blazor.Data.EnumerableOperation.GetColumnType(IEnumerable dataSource, String filterString, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PredicateBuilder(IEnumerable dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PredicateBuilder(IEnumerable dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PredicateBuilder(IEnumerable dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PredicateBuilder(IEnumerable dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PerformFiltering(IEnumerable dataSource, List`1 whereFilter, String condition)
 at Syncfusion.Blazor.Data.BlazorAdaptor.DataOperationInvoke[T](IEnumerable DataSource, DataManagerRequest queries)
 at Syncfusion.Blazor.Data.BlazorAdaptor.<>c__DisplayClass4_0`1.<PerformDataOperation>b__0() at System.Threading.Tasks.Task`1.InnerInvoke()
 at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
 at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
 at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
 at Syncfusion.Blazor.Data.BlazorAdaptor.PerformDataOperation[T](Object query)
 at Syncfusion.Blazor.DataManager.ExecuteQuery[T](DataManagerRequest queries)
 at Syncfusion.Blazor.DataManager.ExecuteQuery[T](Query query)
 at Syncfusion.Blazor.Grids.Internal.FilterCheckBoxRenderer`1.UpdateDataSource(Boolean isInputSearch)
 at Syncfusion.Blazor.Grids.Internal.FilterCheckBoxRenderer`1.InputArgs(ChangeEventArgs args)
 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
 at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
 Unhandled exception in circuit 'rAhG6JBXbZf9LagayOWMT8dcAiduQ2PT-TM-wzh_jXQ'.
System.NullReferenceException: Object reference not set to an instance of an object.
 at Syncfusion.Blazor.Data.EnumerableOperation.GetColumnType(IEnumerable dataSource, String filterString, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PredicateBuilder(IEnumerable dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PredicateBuilder(IEnumerable dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PredicateBuilder(IEnumerable dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PredicateBuilder(IEnumerable dataSource, List`1 whereFilter, String condition, ParameterExpression paramExpression, Type type)
 at Syncfusion.Blazor.Data.EnumerableOperation.PerformFiltering(IEnumerable dataSource, List`1 whereFilter, String condition)
 at Syncfusion.Blazor.Data.BlazorAdaptor.DataOperationInvoke[T](IEnumerable DataSource, DataManagerRequest queries)
 at Syncfusion.Blazor.Data.BlazorAdaptor.<>c__DisplayClass4_0`1.<PerformDataOperation>b__0() at System.Threading.Tasks.Task`1.InnerInvoke()
 at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
 at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown --- at Syncfusion.Blazor.Data.BlazorAdaptor.PerformDataOperation[T](Object query)
 at Syncfusion.Blazor.DataManager.ExecuteQuery[T](DataManagerRequest queries)
 at Syncfusion.Blazor.DataManager.ExecuteQuery[T](Query query)
 at Syncfusion.Blazor.Grids.Internal.FilterCheckBoxRenderer`1.UpdateDataSource(Boolean isInputSearch)
 at Syncfusion.Blazor.Grids.Internal.FilterCheckBoxRenderer`1.InputArgs(ChangeEventArgs args)
 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
 at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)



Attachment: FilterErrorSample_20210326_508c5126.zip

2 Replies 1 reply marked as answer

JM Jun Maeda March 26, 2021 06:54 AM UTC

If you make a video of the error occurrence, it will occur like this.

Attachment: WebApplication__activeltd__Microsoft​_Edge_20210326_155100_33e6a618.zip


VN Vignesh Natarajan Syncfusion Team March 29, 2021 10:54 AM UTC

Hi Jun, 

Thanks for contacting Syncfusion support.    
 
Query: “If you freely search the input field displayed with "Allow Filtering = true", an error will occur if the search is caught in the column with "EditType.DropDownEdit" specified 

We have analyzed the reported issue and we are able to reproduce the reported issue at our end also. We have confirmed the reported query as a bug and logged the defect report “Exception occur when searching a value in Checkbox filter in ForeignKey column” for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our weekly release which is expected to be rolled out by mid of May 2021    
       
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.       
   
 
Till then we appreciate your patience.   
 
Regards, 
Vignesh Natarajan  






Marked as answer
Loader.
Up arrow icon