Farpoint problem with root child grandchild relationship

Farpoint problem with root child grandchild relationship

Old forum URL: forums.lhotka.net/forums/t/5722.aspx


alef posted on Monday, November 03, 2008

I've used the little test project from Lhotka around data binding to grandchild objects. I've replaced the grid from MicroSoft with farpoint spread control but nothing appears in the spread control.

When using BindingSouce for the datasource property of a spread control nothing appears in the spread for the grandchildren. The grid with the grandchildren stays empty.



backwardshoop replied on Tuesday, November 04, 2008

Hello,

I see the same issue as you and have reported this as a bug (#23539) for the FarPoint development team to fix for the next maintenance release. The problem is the Spread source is not expecting to be bound to a BindingSource with many levels of BindingSources as the List. For now, you can set the DataSource to the parent BindingSource and you would see the full hierarchy in the Spread. Comment out the code to set the AutoGenerateColumns property to False and then add this code in the Form_Load event.

Rebind(root);

fpSpread1_Sheet1.DataSource = this.grandchildrenBindingSource.DataSource;

fpSpread1_Sheet1.Columns[2].Visible = false;

Copyright (c) Marimer LLC