本文介绍了如何按...问题对ListView进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Public Function sort(ByVal indx As Short) As Object
theitem = Nothing
ListView1.Sorting = System.Windows.Forms.SortOrder.Ascending
ListView1.SortKey = indx
ListView1.Sort()
End Function
错误是
错误6未声明名称"theitem".
错误7"SortKey"不是"System.Windows.Forms.ListView"的成员.
我尝试使用此
解决此错误
the error is
Error 6 Name ''theitem'' is not declared.
Error 7 ''SortKey'' is not a member of ''System.Windows.Forms.ListView''.
i tried to solve this error with this
Dim theItem As ListViewItem
If ListView1.SelectedItems.Count > 0 Then
theItem = ListView1.SelectedItems(0)
Else
theItem = Nothing
End If
但仍然出现错误
有人帮我
添加了代码标签-LOSMAC [/EDIT]
but its still got error
someone help me
Code tags added - LOSMAC[/EDIT]
推荐答案
这篇关于如何按...问题对ListView进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!