lundi 4 juillet 2016

How to Load data from MySQL Server to a datagridview combobox column

I am hard-pressed and in dire need of your help. I developing a simple VS 2013 app to take stock of drugs sold.

I have a table named DrugList with columns DrugName, UnitPrice and another one Dispensary with columns, PatientNo, DrugName, UnitPrice, Quantity, Amount.

On Dispensary Form, I have a datagridview with columns PatientNo, DrugName, UnitPrice, Quantity and Amount.

I've already saved the drugs in the DrugList table and I want know how i can Link up the DrugName and UnitPrice in the DrugList table to the Datagridview column Drugname and UnitPrice respectively.

So that a user can select DrugName in the Drugname column (combo box) in the Datagridview and then the UnitPrice of the Drug Selected loads to the UnitPrice Column in the Datagridview automatically.

And lastly, the user enters the quantity and the Amount is calculated automatically.

Aucun commentaire:

Enregistrer un commentaire