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

ListView Sorting

Is there a way to sort a listview on the first column?
Alternatively, is there a simple way toe sort an ArrayList with two
dimensions?

Nov 15 '05 #1
2 2059
I'm not sure how to have a two dimensional ArrayList, but you can
write a comparer (class implementing IComparer) to have the ArrayList
sort however you like with your custom objects.

HTH,

--
Scott
http://www.OdeToCode.com

On Sat, 6 Mar 2004 22:50:18 +0100, "Vanessa" <va*****@hipperdy.hop>
wrote:
Is there a way to sort a listview on the first column?
Alternatively, is there a simple way toe sort an ArrayList with two
dimensions?


Nov 15 '05 #2
Rather than use ICompaerer I am transferring value[row,col]
to valueArray, rowArray and colArray and writing a
sort(valueArray,rowArray,colArray)
(sorting on valueArray, swapping the other two accordingly)
and will then bind the results to the listView.

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:re********************************@4ax.com...
I'm not sure how to have a two dimensional ArrayList, but you can
write a comparer (class implementing IComparer) to have the ArrayList
sort however you like with your custom objects.

HTH,

--
Scott
http://www.OdeToCode.com

On Sat, 6 Mar 2004 22:50:18 +0100, "Vanessa" <va*****@hipperdy.hop>
wrote:
Is there a way to sort a listview on the first column?
Alternatively, is there a simple way toe sort an ArrayList with two
dimensions?

Nov 15 '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...
1
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: 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...
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: win | last post by:
The SortKey of VB6 is not in .Net. Can I still do sorting using a listview? Thanks
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.