how do I sort Integers in a listview

前端 未结 7 1686
天命终不由人
天命终不由人 2020-12-16 06:04

How do I sort columns of integers in a ListView

c#, .net 2.0, Winform

System.Windows.Forms.ListView

相关标签:
7条回答
  • 2020-12-16 06:31

    I used Neil-N's class but changed the if statement to test the Type property instead of the Tag property. I set each column to Type Number (instead of Text) that had an integer value in it. Sort works great.

    if (l1.ListView.Columns[Column].Type.ToString() == "Number")
    
    0 讨论(0)
提交回复
热议问题