Hi Sam,
Thank you for your interest in Syncfusion Products.
To get the SelectedNodes in the order they were selected, we need to keep track the selected TreeNodeAdvs and store it in a collecton. Kindly refer to the code snippet and the sample provided below that illustrates this:
private void multiColumnTreeView1_Click(object sender, EventArgs e)
{
bool flag = true, flag1 = false;
Point controlPoint = this.multiColumnTreeView1.PointToClient(Control.MousePosition);
TreeNodeAdv node = this.multiColumnTreeView1.GetNodeAtPoint(controlPoint);
//Remove the TreeNodeAdv from the collection when unselecting the TreeNodeAdv
for(int i = TreeCollection.Count-1 ; i>=0 ; i--)
{
if(node.Text == TreeCollection[i].Text)
{
TreeCollection.RemoveAt(i);
flag = false;
}
}
// Remove the previously selected Nodes when single select is done
for (int i = TreeCollection.Count - 1; i >= 0; i--)
{
flag1 = false;
foreach (TreeNodeAdv tree in this.multiColumnTreeView1.SelectedNodes)
{
if (tree.Text == TreeCollection[i].Text)
{
flag1 = true;
}
}
if (!flag1)
{
TreeCollection.RemoveAt(i);
}
}
if(flag)
{
TreeCollection.Add(node);
}
}
http://files.syncfusion.com/support/Tools.Windows/6.3.0.6/F82374/main.htmPlease let me know if any concerns.
Regards,
Fathima