473,395 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ListView questions

Firstly, is there a way to find out which column header a user has clicked
on? And secondly, is there then an easy way (or any way, for that matter) to
sort the items by that column (either alphabetically or numerically)?

Thanks in advance.
Nov 21 '05 #1
2 1150
Jy,

For all your questions are the answers on MSDN (although you need the
keyword icomparer to search)

sort
http://msdn.microsoft.com/library/de...ssorttopic.asp

columnheader
http://msdn.microsoft.com/library/de...clicktopic.asp

sort by column
http://support.microsoft.com/default...b;en-us;319399

I hope this helps?

Cor
Firstly, is there a way to find out which column header a user has clicked
on? And secondly, is there then an easy way (or any way, for that matter) to sort the items by that column (either alphabetically or numerically)?

Nov 21 '05 #2
* "jy836" <ja**********@comcast.net> scripsit:
Firstly, is there a way to find out which column header a user has clicked
on?
\\\
Private Sub ListView1_ColumnClick(ByVal sender As Object, ByVal e As ColumnClickEventArgs) Handles ListView1.ColumnClick
If e.Column Is Me.ColumnHeader1 Then
...
ElseIf...Then
...
...
End If
End Sub
///
And secondly, is there then an easy way (or any way, for that matter) to
sort the items by that column (either alphabetically or numerically)?


<URL:http://www.codeproject.com/cs/miscctrl/customheader.asp>

There are many other samples on sorting of items in the Windows Forms
section of Codeproject too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: andrewcw | last post by:
The clcik event on the ListView control seems to trigger off the item level ( the first column ). I would like to be able to trap the click event on a particular subitem ( a specific column's row...
2
by: Sagaert Johan | last post by:
Hi I have set the columreorder to true Is there a way to get/set the current columnorder, so i can restore the order from a saved setting ? Johan
1
by: newbie | last post by:
Hello, I maybe asking too much in a single posting, but here it goes: I building a windows form that mimic's the Outlook XP GUI. Its a three pane form that will allow a user to view and edit...
1
by: MrNobody | last post by:
I have a question about how ListView works. I have a data structure of several hundred records which I have used to fill up a ListView. Now, I figured the ListView would take references to my...
9
by: Devron Blatchford | last post by:
Hi there, Just wondering if I change the back and fore colour of a listview item when the mouse hovers over it? I want to overide the default windows colour. Can someone please tell me how to...
1
by: Kenneth | last post by:
I have a listview that fill up some texboxes on a form when I select a listviewItem when I scrolldown in the listview the textbox is update for each item I set focus to. Now to the help I...
1
by: Chris | last post by:
Hi all, I posted the following in microsoft.public.dotnet.framework.windowsforms but it seems that group has little traffic. Hi all, I have a listview box which is populated from methods of...
3
by: Michael.Suarez | last post by:
Is it me, or does it seem like they put no effort into creating the listview control in .Net. listview. A few gripes I have with .Net listview that aren't present in vb6: -Inability to set...
12
by: garyusenet | last post by:
I have had no replies to my previous post so perhaps I didn't write it good enough. Please excuse new thread but i wanted to break from the last thread hopefully this thread will be better. ...
1
by: FireFlux | last post by:
Inherit the Listview Control with Visual Basic ? I have decided do inherit the Listview control some days ago to change some painting things to make the .net Listview look like the explorer's...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.