JSON data not loading in C# after JavaScript rendering in but works fine in Datagrid view

I am trying to load data from the server in DataGrid view but after the rendering from JSON in JavaScript my data does not load. I can display and export the records in flat file but the same report display the message that Index was out of the array, bound problem.

My data is complete loaded from the server and there is no issue in the C#.NET application but only some parameter or values are having a problem after rendering JSON template and from PHP function. I have searched several places for the problems and included the DLL file for sockets but still having the same issue.

The error is: Index was out of the range.
(It’s urgent)