Hi,
I am using the GridGroupingControl that works similar as the Nested Child-Collection example in the winform dashboard.
I couldn't find a way to programmatically add a child table after the data source is bound.
Here is my example modification from the "Nested Child-Collection example",
First I modify the BaseClassList to BindingList so that it supports update
public class BaseClassList : BindingList<BaseClass>, ITypedList
In the Form1 constructor, after
_gridGroupingControl1.DataSource = theList;
I added these to just test programmatically changing the list.
Action mystuff = () =>
{
var list = new BaseClassList();
for (int i = 0; i < 5; i++)
list.Add(new SecondClass(theList[0], i, "myItem" + i));
theList[0].ChildTables.Add("XXXXChild_Of_List0", list);
};
Thread tt = new Thread(() => {
Thread.Sleep(3000);
_gridGroupingControl1.Invoke(mystuff);
});
tt.Start();
There is no effect after few seconds.
I also tried unbind the data source and bind it again it still doesn't work.