I am using utrawebgrid,whenever I am binding grid to the datasource which is having records more than 12815 it is generating following error.Can you please explian me why this is happening and solution over this.
An unhandled exception of type 'System.StackOverflowException' occurred in Infragistics2.WebUI.UltraWebGrid.v8.2.dll
Regards.
It can be due to the following reasons:
- EnableInternalRowsManagement is set to True.
Solution:
- EnableInternalRowsManagement should be False.
- handle paging by handling PageIndexChanged event like:
Private Sub grid_PageIndexChanged(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.PageEventArgs) Handles grid.PageIndexChanged
grid.DisplayLayout.Pager.CurrentPageIndex = e.NewPageIndex
grid.DataSource = datatable
grid.DataBind()
End Sub
ref : Infragistics35.WebUI.UltraWebGrid.v8.1
This may be a bug, or it may be caused by something specific to the application. Either way, it will take some in-depth research to figure out what's happening.
The best course of action I can suggest is for you to create a sample project that we can run and debug that demonstrates this exception occurring, and including that sample when you submit a support request. A Developer Support Engineer will then research using this sample and provide you with further information as to why the exception is occurring and what can be done about it.
Let me give more details.
1) The grid is already using pageing,page size is 10.
2) I also tried to following DisplayLayout-LoadOnDemand="Automatic" but problem is still there.
3) Grid get databinded successfully and this exception is thrown after click on any of the pager number excluding first page.
are you trying to load all the records in the grid at the same time?
If so, that could cuase a performance issue not to mention sending all that data to the client.
Try using load on demand or at least paging the data.