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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:42:32+00:00 2026-05-15T13:42:32+00:00

Right now, I have created a new Object data source based off from an

  • 0

Right now, I have created a new Object data source based off from an Object Context from the entity model. I then created a BindingSource and a DataGridView set to this BindingSource.

I can add columns which are bound to the data from the TraceLine table. When I set the DataSource, I see values in those columns. However, I can’t seem to get the data from the joined table. How do I bind a DataGridView to a query that has a join?

using (var entities = new MyEntities())
{
    var lines = from t in entities.Lines
                join m in entities.Methods on t.MethodHash equals m.MethodHash
                where t.UserSessionProcessId == m_SessionId
                select new
                {
                    m.Name,  // doesn't get displayed in DataGridView, but I want it to
                    t.Sequence,
                    t.InclusiveDuration,
                    t.ExclusiveDuration
                };

    dgvBindingSource.DataSource = lines;
}
  • 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-15T13:42:33+00:00Added an answer on May 15, 2026 at 1:42 pm

    One possible issue is that the DataGridView may have its DataSource set at design time to one of the types but at runtime you’re setting it to an anonymous type that has an extra member. If I recall, DataGridView won’t re-generate the columns if you change the data source after columns have been generated.

    You may need to set the data source to null, clear the column collection, then set the data source. In fact a better idea would be to create the columns explicitly instead of auto generating them.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think what you're after is something like this: $(xml_list).find('entry').each(function(i)… May 16, 2026 at 4:07 pm
  • Editorial Team
    Editorial Team added an answer Yes, you can, but that won't work for the example… May 16, 2026 at 4:07 pm
  • Editorial Team
    Editorial Team added an answer Add this to your crontab to get Drush to update… May 16, 2026 at 4:07 pm

Trending Tags

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

Top Members

Related Questions

So, there have been several posts here about importing and saving data from an
I am new to programming (6 weeks now). i am reading a lot of
Please see the class I have created at http://textsnip.com/see/WAVinAS3 for parsing a WAVE file
We are doing an import process from a source database to a destination database.
So basically i have a domain object and a generic repository that can do
I have been busy with the cakePHP framework for a couple of months now
If I have a model Department with columns user_id and group_id When the action
I have a standard Rails application. When a Tip is created, I would like
I have an Excel 2007 workbook which I am using to connect to a
I have something like this: $i = 0; foreach($tracks['results'] as $track){ $trackName[$i] = $track['name'];

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.