hi guys,
Please create a new windows project. In the new form, please put a wingrid and a button. In button_click event, please use below lines. This will bind a table, which has a releation to itself, to the grid. The codes below are quite straight forward. However, when the user clicks the rows in 2nd band, application is frozen. Any reasons? or it is a bug of UltraWinGrid?
Thanks!
Dim ds As New DataSet
ds.Tables.Add(
With ds.Tables("Parent").Columns
.Add(
ds.Tables(
ds.Relations.Add(
ds.Tables(0).DefaultView.RowFilter = "isnull(ParentID,0)=0"
UltraGrid1.DataSource = ds.Tables(0)
Hello fei_css,
I have been able to reproduce the mentioned behavior. I believe that this happens becasue by default the MaxBandDepth property is set to 100, and in scenarios like yours with self relating data the desired operation would take a very long time to complete. My advise would be setting the following prior setting the DataSource of your UltraGrid:
UltraGrid1.DisplayLayout.MaxBandDepth = 5
Please let me know if you need any other assistance.