Sorting child nodes of a treeview after populating the treeview in c# winforms

前端 未结 4 1307
谎友^
谎友^ 2020-12-11 20:36

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

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 21:11

    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.

提交回复
热议问题