Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
.net core 3.0 .igHierarchicalGrid('dataBind') generates a System.NullReferenceException

I'm using the latest from IG - v19.2 et al via NuGet

This issue also is happening in .net Core 2.2 with v19.1

The igHierarchical grid populates correctly when the data is included with the grid during page load (via MVC helper)

The jquery call $('#igHGrid').igHierarchicalGrid('dataBind') cause the grid to clear and then hang with busy/spinner

Changing the call to $('#igHGrid').igGrid('dataBind') successfully completes, with of course just the parent grid refreshed (no child grids)

I've included a zip file of the entire test solution, pretty much straight out of the box of what VS2019 generated (some minor adjustments to _Layout.cshtml to accomodate IG)

In the sample, note the grid/child grid is properly loaded on page load
Click the "igHierarchicalGrid.dataBind" button to invoke the databind statement

The following is from the VS2019 Output: debug window

System.NullReferenceException: Object reference not set to an instance of an object.

   at Infragistics.Web.Mvc.GridModel.GenerateLayoutsRecursive(Object ds, GridModel parent)

   at Infragistics.Web.Mvc.GridModel.GenerateLayouts()

   at Infragistics.Web.Mvc.GridModel.DataBind()

   at Infragistics.Web.Mvc.GridModel.GetData(HttpContext context)

   at Infragistics.Web.Mvc.GridDataSourceActionAttribute.OnActionExecuted(ActionExecutedContext filterContext)

   at Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

--- End of stack trace from previous location where exception was thrown ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()

--- End of stack trace from previous location where exception was thrown ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)

   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)

   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)

   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Failed to load resource: the server responded with a status of 500 (Internal Server Error) [http://localhost:60958/Home/GetGridData?%24select=ParentId%2CParentRowName%2CParentRowDesc%2CChildGridViewModels&dbdepth=-1&pk=ParentId&_=1575336978858]

Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 138.69310000000002ms 500 text/plain

Error: The remote request to fetch data has failed:  ( 500 Internal Server Error )

    at $.<computed>.<computed>._renderData (c:\temp\iggriddatabind\iggriddatabind\wwwroot\js\infragistics.lob.js:154:20867)

    at $.<computed>.<computed>._renderData (c:\temp\iggriddatabind\iggriddatabind\wwwroot\lib\jquery-ui\jquery-ui.js:144:26)

    at proxy (c:\temp\iggriddatabind\iggriddatabind\wwwroot\lib\jquery\dist\jquery.js:10268:14)

    at Class._errorCallback (c:\temp\iggriddatabind\iggriddatabind\wwwroot\js\infragistics.core.js:375:3370)

    at fire (c:\temp\iggriddatabind\iggriddatabind\wwwroot\lib\jquery\dist\jquery.js:3268:32)

    at Object.fireWith [as rejectWith] (c:\temp\iggriddatabind\iggriddatabind\wwwroot\lib\jquery\dist\jquery.js:3398:8)

    at done (c:\temp\iggriddatabind\iggriddatabind\wwwroot\lib\jquery\dist\jquery.js:9307:15)

    at XMLHttpRequest.<anonymous> (c:\temp\iggriddatabind\iggriddatabind\wwwroot\lib\jquery\dist\jquery.js:9548:10)

The program '' has exited with code -1 (0xffffffff).

The program '[8224] iisexpress.exe' has exited with code -1 (0xffffffff).

  • 905
    Offline posted

    I'd forgotten about the file upload size limit on this forum - the wwwroot folder in the zip file was emptied and will need to be restored with the defaults when a vs2019 solution is created + NuGet IG v19.2

  • 29277
    Offline posted

    Hello Terry, 

    Thank you for sharing an isolated sample. 

    I have investigated this and I have logged it in our internal tracking system with a Development ID of #267355. 

    I have also opened a private case for you so that you can track the status of the issue.

    You can view your active cases at:

     Let me know if you have any additional questions or concerns. 


    Maya Kirova