如何删除gridview上的行 [英] How do I delete a row on a gridview
本文介绍了如何删除gridview上的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
cart = Session("cart")
If e.CommandName = "Remove" Then
If cart Is Nothing Then
cart = New buysell.ShoppingCart()
End If
curitem.ProdId = CInt(GridView1.SelectedValue.Cells(0).Text)
curitem.ProdName = CInt(GridView1.SelectedRow.Cells(1).Text)
curitem.Size = CInt(GridView1.SelectedRow.Cells(2).Text)
curitem.Quantity = CInt(GridView1.SelectedRow.Cells(3).Text)
curitem.Price = CInt(GridView1.SelectedRow.Cells(4).Text)
cart.DeleteItem(curitem)
Session("cart") = cart
GridView1.DataSource = cart.Items
GridView1.DataBind()
推荐答案
检查此链接,它可能帮助你。
删除gridview事件 [ ^ ]
GridView删除,确认 [ ^ ]
更新 - 删除记录 - 使用 - gridview-control [ ^ ]
Check this links, it might help you.
Delete gridview events[^]
GridView Delete, with Confirmation[^]
updating-deleting-records-using-gridview-control[^]
这篇关于如何删除gridview上的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文