J
James L
I am trying to sort a listview control by subitem in ascending and
descending order. I followed the instructions in the Visual Studio
help. They are very explicit and detailed, but unfortuntely it does
not work. Is the help applicable to VB.NET compactframework or only to
desktop VB.NET?
First:
The help says to "add the following line to the forms constructor":
Addhandler listview.columnclick address of me.listview_columnclick
I am unlcear where I am supposed to place this line. If I place it in
the ColumnClick event of the listview it shows no errors but is that
the correct place? Does it belong in the columnclick event, or
elsewhere?
Second:
In the code window VisualStudio underlines certain items and gives me
error warnings with them. Those warnings are:
me.listview.sorting.....
'Sorting' is not a member of 'System.windows.forms.listview'
sortorder.ascending
Name SortOrder is not declared
me.listview.sort.....
'Sort' is not a member of 'System.windows.forms.listview'
me.listview.ListViewItemSorter.....
ListViewItemSorter is not a member 'System.windows.forms.listview'
I understand what the errors mean, these properties do not exist for
the listview control. But if they do not exist, why does the help tell
me to use them? Is there another system item I should be importing
that I might have missed in the Imports lines? Currently I have:
Imports System
Imports System.io
Imports System.Reflection
James Lysaght
descending order. I followed the instructions in the Visual Studio
help. They are very explicit and detailed, but unfortuntely it does
not work. Is the help applicable to VB.NET compactframework or only to
desktop VB.NET?
First:
The help says to "add the following line to the forms constructor":
Addhandler listview.columnclick address of me.listview_columnclick
I am unlcear where I am supposed to place this line. If I place it in
the ColumnClick event of the listview it shows no errors but is that
the correct place? Does it belong in the columnclick event, or
elsewhere?
Second:
In the code window VisualStudio underlines certain items and gives me
error warnings with them. Those warnings are:
me.listview.sorting.....
'Sorting' is not a member of 'System.windows.forms.listview'
sortorder.ascending
Name SortOrder is not declared
me.listview.sort.....
'Sort' is not a member of 'System.windows.forms.listview'
me.listview.ListViewItemSorter.....
ListViewItemSorter is not a member 'System.windows.forms.listview'
I understand what the errors mean, these properties do not exist for
the listview control. But if they do not exist, why does the help tell
me to use them? Is there another system item I should be importing
that I might have missed in the Imports lines? Currently I have:
Imports System
Imports System.io
Imports System.Reflection
James Lysaght