I am looking for a way to sort only certain Child nodes.
Example Tree: The top level categories should be manually sorted while the items should be in alpha order.
I originally set the .Override.Sort property to the category nodes to Ascending but that didn't appear to have any effect. I have also tried to use columnsets but even with manually clicking on the column headers sorting never changed. The direction arrow flipped but the data never moved. I am using 2007 vol 3.
I think Frans is thinking of UltraWinGrid. UltraWinTree doesn't have "bands".
The solution to your problem is to use a different Override. The Override on the tree control affects all the nodes in the tree. But there are also Overrides on the Nodes collection. So what you would do is set the Sort property on the nodes collection of each parent node instead of on the tree's override.
Mike, thanks for the clarification. Though that describes what I am trying to do. The Treeview.Override.Sort has been set to Default. ViewStyle = Standard. Here is my code below. Note that I am setting the Node.Override.Sort = Ascending. Anything that you can see
' Code to add the Categories Nodes
Dim oStartNode As UltraTreeNodeoStartNode = utvItems.GetNodeByKey("MasterOrder")
With oStartNode.Nodes
Dim oNewNode As New UltraTreeNode(String.Format("MO{0}", JobID), JobName)oNewNode.Override.ActiveNodeAppearance.FontData.Bold = DefaultableBoolean.TrueoNewNode.Override.NodeAppearance.Image = My.Resources.FolderClosed_SmalloNewNode.Override.ExpandedNodeAppearance.Image = My.Resources.FolderOpen_SmalloNewNode.Override.Sort = SortType.Ascending.Add(oNewNode)
End With
' Code to add each Item to the Categories
Dim oCatNode As UltraTreeNodeoCatNode = utvItems.GetNodeByKey(String.Format("MO{0}", JobID))
With oCatNode.Nodes
Dim oNewNode As New UltraTreeNode(String.Format("I{0}", dr("iItemID").ToString), String.Format("{0} - {1}", dr("sEPICCode").ToString, dr("sItemDesc").ToString)) oNewNode.Override.NodeAppearance.Image = My.Resources.Green_48oNewNode.Override.ActiveNodeAppearance.FontData.Bold = DefaultableBoolean.True .Add(oNewNode)
Dim oNewNode As New UltraTreeNode(String.Format("I{0}", dr("iItemID").ToString), String.Format("{0} - {1}", dr("sEPICCode").ToString, dr("sItemDesc").ToString))
oNewNode.Override.NodeAppearance.Image = My.Resources.Green_48oNewNode.Override.ActiveNodeAppearance.FontData.Bold = DefaultableBoolean.True
.Add(oNewNode)