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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:26:23+00:00 2026-05-16T14:26:23+00:00

I have a DataGridView with a combobox column in it, showing the possible prices,

  • 0

I have a DataGridView with a combobox column in it, showing the possible prices, and I would like to only display the prices relevant to the particular row.

In more details, let’s say that I have a class method which returns me a dataset with 2 tables populated (feeded by a stored procedure running on a SQL Server 2005 database).

The first table contains the Order Details rows and the second table the prices valid for each of the products.

Basically, my DataTables from the dataset looks like this.

OrderDetails

ProductType  | ProductID | Qty | SelectedPrice     |
DairyProduct |  Milk     |  5  |  5.50             |
Fruit        | Orange    |  7  |  6.90             |

and so on…

On my prices table from the dataset, I have all the prices valid for all products for the order date.

Prices

ProductType  | ProductID | Price     |
DairyProduct | Milk      |   5.50    | 
DairyProduct | Milk      |   6.90    |
DairyProduct | Milk      |   7.90    |
Fruits       | Orange    |   6.90    |
Fruits       | Orange    |   4.50    |

and so on…

I’m binding my OrderDetails table to a DataGridView, which the user will need to modify.

I would like the price column of the DataGridView to display the prices from my second table of the dataset.

I’ve managed to do that, and I now have a combobox for each row, but the ComboBox is displaying all the prices from my prices table, and what I would like to have is only it display the prices valid for that particular product.
For example, if the user clicks the DataGridView on a Milk row, it should only display the prices for the milk and not all of them.

I’m not sure how to achieve that.
Any pointers or examples?

Thanks a lot in advance!

I’m developing on VS 2008, in C# and WinForms.

  • 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-16T14:26:23+00:00Added an answer on May 16, 2026 at 2:26 pm

    looks like you need to bind combo not to datasource directly but to object. the object is a list of prices grouped by productID

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

Sidebar

Related Questions

I have a Winform datagridview with a combobox column. Is it possible to color
Say I have a DataGridView in which I dynamically build up a ComboBox column
I have a ComboBox inside of a cell of a DataGridView Row on a
I have a datagridview with a bound combobox column which contains decimal value. There
how populate ComboBox and DataGridView using MVP (Model-View-Presenter). Actually i have something like this:
I want to show a DataGridView with a ComboBox column that looks like a
I am working with a DataGridView and have a column of type DataGridViewComboBox and
I have a datagridview and a combobox which get populated randomly with data. However,
I have Datagridview .. selected a row .i want that row to be added
i have a DataGridView responsible for showing a bit of data and two of

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.