4
Reply

displaying a datagridview cell value in one form in another datagridview cell in another form

ullas K

ullas K

Sep 25 2012 4:04 AM
4.3k
I am developing a billing system for a store.I have a form1 in which there are two texyboxes and a datagridview.Cardno is enetered in textbox1 and it fetches the name of the customer and checks whether this customer has made purchase for this month and the datagridview is focussed.
Datagridview1 has the following columns

Sl.No
Product No
Product Name
Rate
Qty
Amount

what i need is when i press a enter key in product no column in datagridview1 a datagridview2 showing all the products and product code is loaded in form2.I can select the product code from there.Upto here i was able to do

Now what i want is when i select the product code in datagridview2 in form2 that product code is to be displayed in datagridview1 product code column and depending upon that the product name and rate columns  should be populated on datagridview1 .How can i do this.I do not want the form1 to reload with the form2 values  because i already have the text box values displayed in form1

Pls help and thanks in advance

Answers (4)