How to Sort in ListView

G

Guest

Hai Friends,
I'm using ListView to load and show the data. When use the Sorting Property, the grid is sorted based on the First Column. It is omitting all others.It's giving both Ascending and Descending
If I want to sort based on the Second or any other columns, I'm using the ListViewItemComparer class. But the sorting is done only by Ascending. I need to sort it by Descding too. Please help me friends, to sort both IN Ascending and Descding Order based on the Columns clicked in the ListView.

Thanks
 
H

Herfried K. Wagner [MVP]

* =?Utf-8?B?VmVua2F0YXJhamFu?= said:
If I want to sort based on the Second or any other columns, I'm
using the ListViewItemComparer class. But the sorting is done only by
Ascending. I need to sort it by Descding too. Please help me friends, to
sort both IN Ascending and Descding Order based on the Columns clicked
in the ListView.

You will find some samples here (C#):

<URL:http://www.codeproject.com/cs/miscctrl/#ListView+controls>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top