Well in both cases you add a new row. If you want to modify an existing rows value yuo could use for example Select
] method to first find if such product already exists in the datatable.
On the other hand having two separate rows isn't necessarily a bad thing. Each row represents a selection to the shopping cart so modifying the cart by adding and removing rows is very simple. If you want to show the amount of items in the cart grouped by product you can use for example LINQ to produce the result. For example, see: http://www.eggheadcafe.com/microsoft/Csharp/32180980/how-group-by-and-sum-values-in-datatable.aspx