Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. ListView Sorting

ListView Sorting

Scheduled Pinned Locked Moved C#
algorithmsquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    x trate
    wrote on last edited by
    #1

    Hi, I have a listview (property View is "Details"). I set the sorting property true. Is it possible that the sorting is made after the second column and not the first one (like it does now)? Thanks!

    L 1 Reply Last reply
    0
    • X x trate

      Hi, I have a listview (property View is "Details"). I set the sorting property true. Is it possible that the sorting is made after the second column and not the first one (like it does now)? Thanks!

      L Offline
      L Offline
      Luis Alonso Ramos
      wrote on last edited by
      #2

      Yes, it's possible. But it's not easy. You have to handle the ColumnClick event of the ListView, provide you own sorting mechanism... But wait, actually it's easy :) Simply use the ListViewSortManager class from the following article: http://www.codeproject.com/cs/miscctrl/lvsortmanager.asp[^] I hope it helps! -- LuisR


      Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!

      The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups