What would be the best way to display items in c# in a form
For example I have a pizza(small,medium,large) button.
If I press the small pizza button it will display like this:
Order:
Item Quantity Price
Small Pizza 1 3.99
If I press the add pepperoni button it will display like this:
Order:
Item Quantity Price
Small Pizza 1 3.99
-Pepperoni 1 0.99
If I press the add pepperoni button it will display like this(making it double pep):
Order:
Item Quantity Price
Small Pizza 1 3.99
-Pepperoni 2 1.98
Also adding another item such as a large pizza it will display like this:
Order:
Item Quantity Price
Small Pizza 1 3.99
-Pepperoni 2 1.98
Large Pizza 1 6.99
I basically just want it so you can see what you’ve added to the order.
What would be the best way to do this with c# and windows form?
For a general look at some of the tools available for developing c# applications focused on winforms I’d point you to the MSDN How Tos:
http://msdn.microsoft.com/en-us/vstudio/bb798022#winforms
There are some specific for list controls which others have mentioned, and several provide examples of how to hook up button press events to performing user interface actions.
I would also advise the use of databinding in place of “manually” setting/retrieving values.
WinForms Databinding