Hello..
first of all thanks for help me..
i need more help from u..
could u plz help me?
i have template column inside grid view..
in that one link button called
Remove this? when i click on that link button confirmation box like "Are u sure u want to remove this?" is appeared..
now in template column product name is also in label..
so now i want that when i click on particular row's link button(Remove this?) then confirmation displayed like "Are u sure u wnat to remove this Bangjadtar
?(Product Nmae) Dynamically for each row..
what i had done is pasted below...
(in vb.net)
Sub ComputeSum(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
Handles GridView1.RowDataBound
Dim dgitem As GridViewRow
Dim lnkbtnremove As LinkButton
Dim a As Label
For Each dgitem In GridView1.Rows
a = dgitem.FindControl("lblinprodname")
lnkbtnremove = dgitem.FindControl("lnkRemove")
'b = GridView1.Rows.Item().RowIndex
lnkbtnremove.Attributes.Add("onclick", "return confirm('Are you sure you want to Remove?')")
Next
'' ''objpropproductmaster.prod_id = a.Text
'' ''ds = objbalproductmaster.fatchproductnamedelete(objprop productmaster)
'' ''For Each dr In ds.Tables(0).Rows
'' '' b = dr(0)
'' ''Next
'' ''Dim i As Integer
'' ''Dim name As Label
'' ''For i = 0 To i < GridView1.Rows.Count - 1
'' '' name = GridView1.Rows(i).FindControl("lblinprodname")
'' ''Next
End Sub
-------------------
'for deleting particular item from cart
Public Function del(ByVal prodid As String, ByVal transid As String)
objpropTransaction.trans_id = transid
objpropTransaction.prod_id = prodid
objbalTransaction.DeleteItemFromCart(objpropTransa ction)
End Function
'when particular button is clicked within cart
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs ) Handles GridView1.RowCommand
If (e.CommandName = "del") Then
Dim prodid As String
prodid = e.CommandArgument
Dim prodname As String
prodname = e.CommandArgument
del(prodid, storeidcheck)
bindgrid()
If GridView1.Rows.Count <= 1 Then
Session.Add("cartempty", "True")
End If
End If
End Sub
----
but it gives only last row's product name...
i want each row's column name...
plz help me..
check bold letters also..bez computesum handels gridview1.rowbound event...so
thanking u in advanced..
Regards..
Nitya
Hi there,
You can use the AddMinutes function of the DateTime data type. Like this:
- dim trDate As DateTime = "2008-02-20 12:55:25.000"
-
Dim currDate As DateTime = Date.Now
-
-
If currDate >= trDate.AddMinutes(30) Then
-
-
'DELETE RECORD IN HERE
-
-
End If
-
Hope this helps,
Dr B