0

I’m creating a Fast Food Management System and whenever I click the button in user control , I want the data to be pass in my main form or more specifically in my DataGridView For example I want to buy an item ( burger , fries etc) I will click the button and the item name, amount purchase and the item price will be passed on my form and put it in my datagridview , How can I do that? Sorry for my english

Kalix
  • 1
  • [How to know in a Form what Button was clicked in a UserControl](https://stackoverflow.com/a/67256385/7444103) -- Shows how to pass data from a UserControl to a Form when a Button is clicked (it shows the use of 3 Buttons, which have different functionality; you need just one, the code doesn't change). The Form (or a dedicated / specialized class handler) can subscribe to the event and do whatever is needed with the data received from the UC. – Jimi May 15 '22 at 13:59
  • Hi how do I put the class? Sorry I’m still new in windows form and doesn’t know much about it, I’m also having a hard time understanding it since we’re just in online class – Kalix May 15 '22 at 16:16
  • I have one button for each items – Kalix May 15 '22 at 16:20
  • Please provide enough code so others can better understand or reproduce the problem. – Community May 16 '22 at 06:19

0 Answers0