I am having trouble sorting child nodes of a treeview in my winforms program. My treeview is populated by some XML files and it uses an internal text inside the xml files as
You're using alphabetic sorting, so D10 comes after D1. You should try to sort discarding "D" char and converting the rest of string to a number.