DataGridView Combo Box (Can it update others)?

DeltaWolf7

Well-known member
Joined
Jan 21, 2006
Messages
47
Programming Experience
Beginner
I have a datagridview that gets data from a dataset.
You basically select a product from the drop down combo and then is should update the boxes next to it with price, etc.

Can this be done?
I can select a product but nothing happen in the boxes next to it.
 
you didnt feel like telling us very much information then? is this a master-detail relationship, or is it a single table?
 
I am really sorry I was in a rush to get home from work.

Ok, here the story.

I have a datagridview that is using a dataset that gets filled from a mysql database.
I have told each column, which I manualy added to the datagridview, what it should contain. So the first column which is product name gets the data from the dataset and displays a drop down combo box for the user to choose a product.
Next to that column I have information such as model, price per unit, qty and total.

What I want to do is update the row with the model, price per unit and calculate the total based in the qty entered by user. All releated to the product selected in the first column.

Does that make sense? Its hard to describe I have never used datagridviews like this.

oh an yer, just a very simple single table nothing complex. I can't do anything like that yet.
 
erm

it sounds confusing

Are you saying that you have a column full of nothing but comboboxes
each combo holds ALL the known products
upon selecting a product, the details appear in the other columns?


talk about making things difficult!
 
Damn my newbie talking ways...hehehe

Ok let me see if I can explain this a little better.

Rather then having a datagrid that the user can type in, I am trying to let them choose the product from a drop down list (which is part of the datagrid). Then once the product is selected (so sort of mouse out event i am guessing) the software then puts the price in the price column on that row.

Does that make more sense?
 
can i just check we arent going to hit a usability issue here... does this system only have 20 products max?
 
Well right now it has about four products.
But it may have more depending on what gets added by others later.

I would guess more then 20 products is very likley.

I am a total newbie with this. How should I be making a purchase gird of some sort? Are you saying more then twenty products can't be done?
 
How to populate DataGridView with a MySQL database

Hi there can u teach me the codes on how to retrieve data from MySQL using a DataGridView? will u send me ur codes? I use the code on the DataGrid but it dosnt work on DataGridView

Tnx!!
 
Well right now it has about four products.
But it may have more depending on what gets added by others later.

I would guess more then 20 products is very likley.

I am a total newbie with this. How should I be making a purchase gird of some sort? Are you saying more then twenty products can't be done?

not at all - you can load a million items into a combobox if you have the memory... but did you ever try to select one item out of a combo that holds millions of items? Only 10 are on show at once, one pixel of the scroll bar jumps at least 10,000 items and if you click the wrong thing, it vanishes

i.e. not good! Noone should ever consider using a combo for more than 30 items, and even that is pushing it!

Systems like this normally work by having a textbox who has the focus and the barcode or id of the item is entered in. The lookup is performed when return is pressed. THe item is entered into the grid. Other keys change the entries, like type 6 and then press F2 to change the quantity...
 
Back
Top