Hi,
When I click a row in a grid where I have a self-referencing table as the data source, the program freezes (100% cpu). I'm using WinGrid V9.2 with VS 2008 and VB.NET.
I've pared it down to the point where the problem arises after the dataset relation is defined. Here's an extract of the code.
Private ds As DataSet = New DataSet()ds.Tables.Add( datatable is returned here from a call to a tableadapter fill method )ds.Relations.Add("MyDataTable", ds.Tables(0).Columns("Id"), ds.Tables(0).Columns("PId"), False)UltraGrid1.SetDataBinding(ds, "MyDataTable")
The grid is not customised at all and all the event handlers are commented out.
The table only contains 16 rows which are the root level (I initially thought it was the volume of data that could be the cause). Here's a sample:
Id PId Code Description Level_No--- ----- ------ ------------- --------1 NULL A Apple 22 NULL B Banana 23 NULL C Cherry 24 NULL D Damson 2
If I use WinTree I don't have a problem. Here's the corresponding code:
UltraTree1.Override.ShowExpansionIndicator = ShowExpansionIndicator.CheckOnDisplay UltraTree1.SetDataBinding(ds, "MyDataTable") UltraTree1.ViewStyle = Infragistics.Win.UltraWinTree.ViewStyle.OutlookExpress
Any suggestions please?
Craig
Hi Mike,
MaxBandDepth is now set to a sensible number and works fine.
Thanks again.
Thanks for the pointer.
Hi Craig,
This is discussed in the WinGrid Performance Guide.
Specifically, check out section 4 entitled "Recursion".