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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:07:53+00:00 2026-05-26T02:07:53+00:00

Design class which is generated by C# : // // usepurposeComboBox // this.usepurposeComboBox.DataSource =

  • 0

Design class which is generated by C# :

    // 
    // usepurposeComboBox
    // 
    this.usepurposeComboBox.DataSource = this.usepurposeBindingSource;
    this.usepurposeComboBox.DisplayMember = "Name";
    this.usepurposeComboBox.FormattingEnabled = true;
    this.usepurposeComboBox.Location = new System.Drawing.Point(277, 53);
    this.usepurposeComboBox.Name = "usepurposeComboBox";
    this.usepurposeComboBox.Size = new System.Drawing.Size(218, 21);
    this.usepurposeComboBox.TabIndex = 4;
    this.usepurposeComboBox.ValueMember = "id";
    // 
    // usepurposeBindingSource
    // 
    this.usepurposeBindingSource.DataSource = typeof(mydatabaseEntities.usepurpose);

Then I bound the BindingSource (usepurposeBindingSource) to Entities :

usepurposeBindingSource.DataSource = mydatabaseEntities.usepurposes;

And I can not add a new row to usepurposeComboBox because it’s been bound. Is there a workaround ?

  • 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-26T02:07:54+00:00Added an answer on May 26, 2026 at 2:07 am

    I resolved it on my own. I created a new unbound combobox then bind it to a datatable. Not sure if it’s the best way but it works for me. Thanks for all of your suggestions. 🙂

    private void FillCombobox()
            {
                using (mydatabaseEntities mydatabaseEntities = new mydatabaseEntities())
                {
                    List<usepurpose> usepurposes = mydatabaseEntities.usepurposes.ToList();              
                    DataTable dt = new DataTable();
                    dt.Columns.Add("id");
                    dt.Columns.Add("Name");
                    dt.Rows.Add(-1, "test row");
                    foreach (usepurpose usepurpose in usepurposes)
                    {
                        dt.Rows.Add(usepurpose.id, usepurpose.Name);
                    }
                    usepurposeComboBox.ValueMember = dt.Columns[0].ColumnName;
                    usepurposeComboBox.DisplayMember = dt.Columns[1].ColumnName;
                    usepurposeComboBox.DataSource = dt;
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which class design is better and why? public class User { public String UserName;
I have a class which is going to need to use the strategy design
Your job is to design a Project Plan class library which supports the tracking
Which constitutes better object oriented design? Class User { id {get;set} } Class Office
I am having a little design crisis, I am making a Plane class, which
I was reading up on singleton class design in C# on this great resource
I'm trying to design a class which has two vectors of large sequences. std::vector<double>
I am drawing a complete blank on the name of this design pattern. It's
I'm building an ordering system. And here I have an Order class, which has
A brief preface: I'm in a game design class where our project for the

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.