Duong Anh

Duong Anh

  • NA
  • 27
  • 3.4k

Help me C#!

Jan 9 2013 8:36 AM
Hi ! everyone ! I'm student
I have a problem about my project
My project :

i need enter a new Row on datatable and database will upraise to Datagridview on Form

I use code to add new row : 
  DataRow n = tb.NewRow();
 n["FoodName"] = "Pepsi";
 n["Quantity"] = 1;
 tb.Rows.Add(n);



datagridview:

i have a datagridview
  FoodName (Column)| Quantity(Column)
FoodName Quantity


i want while I click button [Pepsi] , My datagrid will :
FoodName Quantity
Pepsi
1
 If I Second Click button[pepsi] , my datagird will:....and ect.........Thirth......Fourth...... quantity will 3,4.....
FoodName Quantity
Pepsi
2


as button CocaCola , Button Coffee
 

Please Help me !!
my e-mail: [email protected] 
you can send e-mail for me !! Thankyou Everyone read !!! 


Attachment: orderexmini.rar

Answers (23)