Wrox Programmer Forums
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 7th, 2007, 03:47 PM
Authorized User
 
Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default How To?

In scenarios like shopping cart where the shopper will NOT be deleting from the backend database but rather would be able to delete a product from shoppingcart ->how do you delete an unbound GridView Row?

In other words,What is the possible way of deleting a row from GridView without effecting the underlying database database?

Any resources or links or suggestions?



Thanks :)
 
Old May 7th, 2007, 03:52 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Doesn't that depend on what it is that you bind to the GridView?

Usually, you have some sort of collection (List<Something>, Collection, DataTable etc) that holds the items in the cart.

Usually, you'd remove the item from that intermediate list, and then rebind the GridView.

HtH,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old May 10th, 2007, 04:38 AM
Friend of Wrox
 
Join Date: Apr 2007
Posts: 110
Thanks: 1
Thanked 2 Times in 2 Posts
Send a message via MSN to ayazhoda
Default

It depend how you want to do it
if you want to handle it on client side then check controls but the other way to do that on database site

Make another table which is like temp table this table will track customer interest and other information like customer IP address potential product of interest what ever customer picked from product catalog will goes here and if customer delete any thing it will mark that product as "0" or No , in the end when customer check out transfer all data back to order table

select * from temporder where customer="XXXXX" and product <> 0











Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.