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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:40:59+00:00 2026-05-13T17:40:59+00:00

I have a list of classes that represent mydatabase tables for example Address,Client. My

  • 0

I have a list of classes that represent mydatabase tables for example Address,Client.

My GUI tends to be a grid of data and an data entry form. This works fine for single table data entry however I now have a form that has client information and their address.

I was thinking of using a ViewModel combining the Address and Client class and assigning that to a bindingsource and binding my controls to that.

How would I bind the controls to the property names? Would this work…

if (txtLine1.DataBindings.Count == 0)
                txtLine1.DataBindings.Add("Text", bindingSource, "Address.Line1", false, DataSourceUpdateMode.OnPropertyChanged);

Is having a ViewModel even possible for Winforms databinding?

  • 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-13T17:40:59+00:00Added an answer on May 13, 2026 at 5:40 pm

    I created a ViewModel and then created a DataSource in VS. I then dragged the properties of the classes in my viewmodel to the form and this created the controls I needed. I then call the Save method for each class in my viewmodel.

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

Sidebar

Related Questions

For classes that have a long list of setters that are used frequently, I
I have a Silverlight application that retreives a list of serializable classes. In these
Concerning data binding I have these classes: public class Foo : List<Bar> { public
I have the following classes: Defect - represents a type of data that can
I have two classes that represent two different database entities. Their relationship is 1:m
I have a method that takes a list of entities ( Class es) and
I have two classes: Media and Container. I have two lists List<Media> and List<Container>
I have two classes Company CompanyKey CompanyName Person FirstName LastName CompanyKey The list items
I have the following classes [XmlRoot] public class AList { public List<B> ListOfBs {get;
I have two classes: Account and Operator. Account contains a list of Operators. Now,

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.