Click here to Skip to main content
15,888,008 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i try with this code but she doesn't work
C#
lstgauche.Sorted = false;

plese give me the answer

What I have tried:

i try with this code but she doesn't work
C#
lstgauche.Sorted = false;

plese give me the answer
Posted
Updated 11-Feb-17 19:22pm
v2
Comments
Afzaal Ahmad Zeeshan 11-Feb-17 15:14pm    
What you need to do is sort a list in a descending order.
tahamousnia 11-Feb-17 17:28pm    
yes exactly
Afzaal Ahmad Zeeshan 12-Feb-17 4:18am    
Then, do it. What's the problem?
Patrice T 11-Feb-17 16:11pm    
"i try with this code but she doesn't work "
It works ! since this ask for no sort.

You should as far as possible separate the logic from the presentation, so sort the list in code first before binding it to the listbox control: Check this out: List(T).Reverse Method (System.Collections.Generic)[^]
Keep the sorted property of the listbox as false.
 
Share this answer
 
check these similar thread,variety of methods for sorting
c# - Sorting a list of items in a list box [^]
c# - How to sort items in listbox [^]
 
Share this answer
 

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