473,378 Members | 1,422 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,378 software developers and data experts.

Sorting a column of a listview

Hello,

In Vb6, sorting a column of a listview is like this:

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As
ComctlLib.ColumnHeader)
Me.ListView1.SortKey = ColumnHeader.Index - 1
If Me.ListView1.SortOrder = 0 Then
Me.ListView1.SortOrder = 1
Else
Me.ListView1.SortOrder = 0
End If
Me.ListView1.Sorted = True
End Sub

How do I manage this in vb.net ?

Thanks,

Jan Driesen
Nov 20 '05 #1
2 3610
Cor
Hallo Jan,
You can search on the keywords "listview" and "Icomparer" on MSDN or Help,
there you find an example and documentation.
Succes
Cor
Nov 20 '05 #2
Hello,

"Jan Driesen" <ja*********@ergon.be> schrieb:
In Vb6, sorting a column of a listview is like this:


http://www.codeproject.com/cs/miscct...tView+controls

http://www.google.de/search?q=cache:...hl=de&ie=UTF-8

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

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

Similar topics

0
by: rmorvay | last post by:
I have successfully integrated sorting in the listview control with the following code: Private Sub ListView_ColumnClick(ByVal sender As Object, ByVal e As...
0
by: Abhishek | last post by:
Hi! I am using listview control having 4 columns. I want it to behave in a similar manner as the details view of windows explorer. i.e it should sort on all the columns and all the columns...
19
by: Owen T. Soroke | last post by:
Using VB.NET I have a ListView with several columns. Two columns contain integer values, while the remaining contain string values. I am confused as to how I would provide functionality to...
5
by: billuy | last post by:
Is there a way to sort by a specified column in a listview? I'd like my users to be able to click on the column heading and have the listview sort by that column. Thanks, Billyb
3
by: Curtis | last post by:
I am trying to do a simple sort on a list view.With the listview control the first time I sort on the control it sorts the items but anytime after that it fails to sort. I'm sure this is a simple...
2
by: yxq | last post by:
Hello, By default, when set the listview's property "Sorting=Descending", the listview will sort the items base on the string in first column(column(0)) while adding items, how to specify listview...
2
by: jediknight | last post by:
Hi, I have a listview which has columns of text and columns of numerical data. I need to be able to sort these columns into ascending/desending order whenever the user clicks on the column...
2
by: Steve Z. | last post by:
I am trying to implement the sorting of a ListView object by clicking on a column (using the example at:...
2
by: win | last post by:
The SortKey of VB6 is not in .Net. Can I still do sorting using a listview? Thanks
4
by: rajtalent | last post by:
hi all, I want to sort the colum when clicks the columnheader using vb.net 2005 .But i receive the following error "Error 1 Overload resolution failed because no accessible 'New' accepts...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.