I have some simple code to sort a listview (3 columns wide). When a user clicks the column header it will sort ascending or decending depending on the current state. Unfortunately it sorts numbers ascending as if they were text:
I want it to sort ascending like:
Also the reverse (descending is true too)
Any help is appreciated
Dim pooX As Boolean
Private Sub lstMenu_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles lstMenu.ColumnClick
Dim lstCol As ColumnHeader
If pooX Then
lstMenu.Sorting = SortOrder.Ascending
pooX = False
lstMenu.Sorting = SortOrder.Descending
pooX = True
A workaround for this is to left-pad your numbers with spaces so that they are all the same length. So if 222 (or 999) is the highest number in the listview column, rather than filling with "1" you fill
Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares.
The application is written in VB.NET targeting the .NET framework 2.0.
The source code and the compiled programs have been in…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.