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

Object reference not set to an instance of an object when searching


I have a DataGrid that correctly displays the data, however, when performing a search, an exception is thrown: "Object reference not set to an instance of an object."

From the stack trace, it appears that the problem is something to do with the column type?

   at Syncfusion.EJ2.Base.QueryableOperation.GetColumnType[T](IQueryable`1 dataSource, String filterString, Type type)
   at Syncfusion.EJ2.Base.QueryableOperation.PerformSearching[T](IQueryable`1 dataSource, List`1 searchFilter)
   at Syncfusion.EJ2.Base.DataOperations.PerformSearching[T](IEnumerable`1 dataSource, List`1 searchFilter)
   at MyPortal.Services.UtilityService.PerformDataOperations[T](IEnumerable`1 dataSource, DataManagerRequest dm) in C:\Users\rowan\RiderProjects\MyPortal\MyPortal\Services\UtilityService.cs:line 22
   at MyPortal.Controllers.Api.MyPortalApiController.PrepareDataGridObject(IEnumerable`1 list, DataManagerRequest dm) in C:\Users\rowan\RiderProjects\MyPortal\MyPortal\Controllers\Api\MyPortalApiController.cs:line 87
   at MyPortal.Controllers.Api.StudentsController.<GetAllStudentsDataGrid>d__3.MoveNext() in C:\Users\rowan\RiderProjects\MyPortal\MyPortal\Controllers\Api\StudentsController.cs:line 57

1 Reply

TS Thavasianand Sankaranarayanan Syncfusion Team November 7, 2019 01:07 PM UTC

Hi Rowan, 

Greetings from Syncfusion support. 
We are not able to reproduce your reported problem with the provided information. Grid searching is working fine, you can find the sample for your reference below, 

It would be helpful for us to identify your issue if you could provide us the following information, 
  • Grid related code block used in your application
  • Syncfusion package version used
  • If possible try to reproduce it in the above provided sample.

Thavasianand S. 

Live Chat Icon For mobile
Up arrow icon