Binding XtraTreeList to Dataset in runtime
I'm experienced with unbound forms in VB6 and I'm now simultaneously learning C# and trying to figure out how to use bound forms at the same time, so fairly new to both!
What I'm trying to do is bind an XtraTreeList control to a dataset in runtime. On application start, a dataset is filled using a dataAdapter object, this works fine. I've used the designer to add two TreeListColumns and specified the appropriate FieldName properties. However, I have this code in the form's onLoad event:
private void MainForm_Load(object sender, System.EventArgs e)
{
TreeList1.DataSource = DataSet1;
}
This doesn't seem to work. The TreeList is empty, even though I know the SQL command in the dataAdapter returns one row. Have I missed out a step? I tried adding "TreeList1.PopulateColumns();" but this outputs "System.Data.DataView" in the TreeList. What am I doing wrong?
Thanks in advance,
Mat

