Click here to Skip to main content
15,907,392 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

I am trying to simulate a shopping cart functionality. My available products are displaying in a Products_Gridview, which have a AddTOCart button. When this button is pressed it builds a DataTable with fewer columns from Product table and binds it to another gridview (Cart_Gridview). I store this datatable in viewstate also for later binding also.

Now the problem is that I want a Remove button in each row of Cart_GridView which could delete relative row from Cart_Gridview. I have tried a lot but could'nt delete row from Cart_Gridview. I also tried to delete row from data table from which cart gridview is bind but it shows 0 row in DataTable in Cart_GridView_RowDeleting and Cart_GridView_RowCommad Events.

any help will be greatly appreciated.

Thanks in advance
Posted
Comments
bbirajdar 25-Apr-12 5:03am    
If you think that the error is in your code, and somebody should help you to fix it, then does it make sense to you, that you need to post the code also...?
RashdSiddique 25-Apr-12 5:05am    
Post your code first

 
Share this answer
 
v2
Comments
sravani.v 27-Apr-12 2:49am    
My 5!
Prasad_Kulkarni 27-Apr-12 2:53am    
Hey thank You,
I left comment for you here[^]
Thanks for replying dear.

I found the solution. Actually I was forgetting to take Cart_GridView from ViewState in RowCommand. Finally I did it.

Thanks for reviewing...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900