Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All
I am using Windows CE Device in application C# where I am trying to sort ListView but Sort() properties is not there so how can I sort and then show in ListView

Please Help me

All = Thanks;
Posted
Comments
[no name] 4-Apr-13 9:00am    
So sort your data before put it in the listview.
CHill60 4-Apr-13 9:06am    
My virtual +5!

Most likely you are better off providing the data sorted on the server side, like SQL's ORDER BY,
or of course C# that has endless possibilities for that.

If you eventually need to implement sorting on the client side, I'll be happy to help, in which case you need to provide some more info on the requirements and nature of your data and the listview.

Cheers,
Edo
 
Share this answer
 
Comments
IndrajitDasgupat 9-Apr-13 1:27am    
the data is not coming from Data Base it is coming through scan data from RFID Tag
Have a look at this codeproject article A sortable list view control[^] - it looks to be very old (2004) but was updated earlier this year
 
Share this answer
 
 
Share this answer
 
Comments
IndrajitDasgupat 8-Apr-13 8:02am    
I am getting the following error
"the type or namespace 'sortOrder' could not be found are you missing a using directive or assembly reference"
Aarti Meswania 8-Apr-13 8:14am    
Instead of "sortOrder" write "SortOrder" 's' & 'o' are capital
IndrajitDasgupat 9-Apr-13 1:25am    
I had given the same "SortOrder" but same error is comming
C#
This Will Help You......

if (e.Column == 0)
{
    if (SortStyle == 0)
    {
        List.ListViewItemSorter = customSortDsc;
        SortStyle = 1;
    }
    else
    {
        List.ListViewItemSorter = customSortAsc;
        SortStyle = 0;
    }
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900