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
390
Application freezes when clicking a row in a grid with self-referencing table as source
posted

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         2
2   NULL  B      Banana        2
3   NULL  C      Cherry        2
4   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