Advertisement
ASP_Volume3 Miscellaneous #49704

ListView Sort

This Is a handy code for sorting a ListView Box by whichever column header is clicked.

AI

AI சுருக்கம்: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

மூலக் குறியீடு
original-source
Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
  ListView1.Sorted = True
  
  If ListView1.SortKey = ColumnHeader.Index - 1 Then
    If ListView1.SortOrder = lvwAscending Then
      ListView1.SortOrder = lvwDescending
    Else
      ListView1.SortOrder = lvwAscending
    End If
    
  Else
    ListView1.SortOrder = lvwAscending
    ListView1.SortKey = ColumnHeader.Index - 1
    
  End If
  
End Sub
அசல் கருத்துகள் (3)
வேபேக் மெஷினிலிருந்து (Wayback Machine) மீட்டெடுக்கப்பட்டது