Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4568640
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:06:18+00:00 2026-05-21T19:06:18+00:00

I already googled for an hour now and didn’t find a working answer. I

  • 0

I already googled for an hour now and didn’t find a working answer.

I have a myClass with different members such as a string Name and some int Numbers. Then I have a myList of type List and then I have a Listbox control.

I can easily display the List in the Listbox by using DisplayMember = "Name" and DataSource = new BindingList<myClass>(myList.Values).

But what I want is to make it sortable by the different Members of my class. I already tried creating a BindingSource of my List and pass it to the Listbox, but then the only entry in my Listbox is “(Enumeration)” (the type of the bindinglist, but not its members).

What do I need to display a simple List in a simple Listbox control AND make it sortable by the members of T?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:06:19+00:00Added an answer on May 21, 2026 at 7:06 pm

    BindingList doesn’t implement sorting by itself, although it offers you that capability should you choose to implement it. You can inherit from BindingList and start from here. Keep in mind that sort operations probably shouldn’t modify the original list.

    There are existing implementations, like the BindingListView that will also give you what you need.

    However, the easiest way I’ve found is to use a DataTable populated with the members of the class. This will let you leverage the DataView for free which already supports sorting, filtering, and all the nice things.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have already googled and searched stackoverflow but I can find nothing related to
I already googled around to find a solution for my need, with no success.
I googled,I binged,I already have seen the other duplicates here,but none of them work
i googled for an hour now but maybe my Google-Fu is just too weak,
Hi I want to have push notification in blackberry.I have already googled for the
I'm pretty sure an hour after I post this I may find the answer
I had already googled for an answer, but nothing happens... I need to change
I have already googled for this I have a Table with following structure in
I already googled and tried myself for days now without result. How is it
I have already googled that 505 is HTTP Version not supported, but still can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.