Posted: 11/15/2011
Hi I have built a shopping cart using the shopping cart instance class and a gridview control which also has a dropdown list nested in each row to allow users to select a size option.
If a user removes an item from the shopping cart instance we need to rebind the grid to remove the instance from the cart list, however it also resets the dropdowns to zero again losing their previous selections.
Is there a way to remember the dropdown list values when rebinding, I welcome ideas.
Posted: 11/16/2011
The approach I am thinking of taking is to create a guid and save this along with the id of the product and the selected sizes to an orders temp table in DB, then after removing the row and when rebinding try to reset the sizes in the gridview item databind event.
Is there an easier way.