sorting - Asp.net: How to sort a dropdown having duplicates? -


I have a dropdown in which we add some items after the dropdown, the data is bound by DB, so to sort The dropdown is required so I need to sort a dropdown that can be duplicated. What is the best way to do this?

Instead of adding items directly to the dropdown, I would suggest adding them to the data structure that you tie . If you apply the item IComparable to this structure, you can define a comparison method to apply the sorting before the dropdown is actually bound to the data source.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -