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

  • Home
  • SEARCH
  • 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 151475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:27:20+00:00 2026-05-11T09:27:20+00:00

I need some help/guidance on WinForms data binding and I can’t seem to get

  • 0

I need some help/guidance on WinForms data binding and I can’t seem to get Google to help me with this one.

Here is my scenario. Consider the following classes which is similar to what I need:

public class Car {     public string Name { get; set; }     public List<Tire> Tires { get; set; } }  public class Tire {     public double Pressure { get; set; } } 

My instances of this will be an object of class Car with a List with four Tire objects. Note that I will always have a known number of objects in the list here.

Now I want to data bind this to a Form containing five textboxes. One textbox with the name of the car and one textbox with each of the tires pressures.

Any idea on how to make this work? The designer in VS does not seem to allow me to set this up by assigning to list indexes like Tires[0].Pressure.

My current solution is to bind to a ‘BindableCar’ which would be like:

public class BindableCar {     private Car _car;      public BindableCar(Car car)     {         _car = car;     }      public string Name     {         get { return _car.Name; }         set { _car.Name = value; }     }      public double Tire1Pressure     {         get { return _car.Tires[0].Pressure; }         set { _car.Tires[0].Pressure = value; }     }      public double Tire2Pressure     {         get { return _car.Tires[1].Pressure; }         set { _car.Tires[1].Pressure = value; }     }      public double Tire3Pressure     {         get { return _car.Tires[2].Pressure; }         set { _car.Tires[2].Pressure = value; }     }      public double Tire4Pressure     {         get { return _car.Tires[3].Pressure; }         set { _car.Tires[3].Pressure = value; }     } } 

but this becomes really ugly when my lists contains 20 instead of 4 objects, and for each of those objects I want to bind against 6 properties. That makes a huge ‘BindableObject’!

  • 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. 2026-05-11T09:27:20+00:00Added an answer on May 11, 2026 at 9:27 am

    While the WinForms designer may not let you do this, have you tried setting up the binding in code? I imagine there is no problem binding a textbox to someCar.Tires[1].Pressure.

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

Sidebar

Ask A Question

Stats

  • Questions 180k
  • Answers 180k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Something like this should do: SELECT c.CourseID, c.Title, SUM(s.Has_Completed) Completed,… May 12, 2026 at 4:01 pm
  • Editorial Team
    Editorial Team added an answer <meta name="google" value="notranslate"> from Google FAQ. Not sure if this… May 12, 2026 at 4:01 pm
  • Editorial Team
    Editorial Team added an answer As I expressed in a comment above, I’m too very… May 12, 2026 at 4:01 pm

Related Questions

I need some help/guidance on WinForms data binding and I can't seem to get
I'm kinda stuck with this one so I hoped someone could help me. I
I see that the IronRuby team has documented using ActiveRecord in IronRuby with MSSQL
My application collects HTML content provided by internal users that is used to dynamically
I'm trying to figure out the best way to do caching for a website

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.