How to: Prevent a specific node from being focused

The following example prohibits focusing the first node within the control, by handling the TreeList.BeforeFocusNode event.

private void treeList1_BeforeFocusNode(object sender, 
DevExpress.XtraTreeList.BeforeFocusNodeEventArgs e) {
   if (e.Node.Id == (sender as TreeList).Nodes[0].Id) 
      e.CanFocus = false;
}