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 296277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:32:02+00:00 2026-05-12T06:32:02+00:00

I have a helper class that implements ITypedList, to provide objects for databinding against

  • 0

I have a helper class that implements ITypedList, to provide objects for databinding against custom collections.

My implementation allows me to easily specify that I want sub-properties of objects to be available for data binding, for instance I can bind to “Id”, “Name”, and also “Children.Count”.

Now, my problem now is that in order to provide helper-objects to data-bind to such columns, I need to pre-populate a collection with those objects, and then later on when a grid asks for such helper objects through the interface, it will call a method on my object to retrieve them.

The method it calls has a parameter that can be used to specify which accessor objects to retrieve, but it’s invariably null for the .NET DataGridView class, which means I just have to return all the objects I got.

So my question is this. Is there an alternative to ITypedList that I can implement where I will be told explicitly which properties the grid is interested in, so that I don’t have to pre-populate the collection of acccessor objects?

Here’s what my code looks like now:

var wrapper = new TypedListWrapper<Person>(someNormalCollectionClass);
wrapper.BindableProperties = "Id;Name;Children.Count";
grid.DataSource = wrapper;

here’s what I want it to look like:

grid.DataSource = new TypedListWrapper<Person>(someNormalCollectionClass);

Any takers?

  • 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-12T06:32:03+00:00Added an answer on May 12, 2026 at 6:32 am

    If you were to create your own grid, then of course you could implement functionality like this, but not with the DataGridView (or, I would imagine, any current third-party grid control). I would also be wary of the design-time constraints this would place. If PropertyDescriptor initialization is what’s causing your concern, then I would suggest loading up the individual PropertyDescriptor objects with just a name and a type and have actual usage of the object cause it to load any other information that might be required.

    In general, though, these should be inexpensive operations. If you’re having performance anxiety over your ability to obtain the list of properties in a reasonable amount of time, you may need to examine where the bottleneck is in your architecture and try to find a way around it. Apart from that, though, I don’t see an option for you. The databinding system is, by design, consumer agnostic. There is no means for a binding consumer to indicate whether or not he intends to use a descriptor or not. Having something like that would be a real chicken-or-the-egg headache.

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

Sidebar

Related Questions

I have a helper class that I want to display a UIAlertView then will
I have a helper class that should only ever run in a background thread.
I have a helper class that is passed an array of values that is
I currently have a helper class that I am using to obfuscate a static
I have a REST service and I want to have a helper class that
I am trying to design a helper class that implements methods using AsyncTask. public
I have a data mapping helper class that uses generics and reflection. Since I'm
I have a helper class designed to get data from Core Data and pass
I have a JSON helper class. I have been trying to to display a
I have the following methods in an enum helper class (I have simplified it

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.