I am using the following code for deleting the checked record.
--- For Each row In Products.Rows
var = Convert.ToInt32 (Products.DataK eys(row.RowInde x).Value)
Dim cb As CheckBox = row.FindControl ("ProductSelect or")
If cb IsNot Nothing And cb.Checked = True Then
'If cb.Checked = True Then
atLeastOneRowDe leted = True
Dim TestID As Integer = _
Convert.ToInt32 (Products.DataK eys(row.RowInde x).Value)
objTest.TestId = Convert.ToInt32 (Products.DataK eys(row.RowInde x).Value)
objTest.TestDel ete()
lblDeleteResult s.Text = "This would have deleted" & TestID
Products.DataSo urce = objTest.TestGri dviewBind
Products.DataBi nd()
End If
Next
But it does not work
Pls help me out.
--- For Each row In Products.Rows
var = Convert.ToInt32 (Products.DataK eys(row.RowInde x).Value)
Dim cb As CheckBox = row.FindControl ("ProductSelect or")
If cb IsNot Nothing And cb.Checked = True Then
'If cb.Checked = True Then
atLeastOneRowDe leted = True
Dim TestID As Integer = _
Convert.ToInt32 (Products.DataK eys(row.RowInde x).Value)
objTest.TestId = Convert.ToInt32 (Products.DataK eys(row.RowInde x).Value)
objTest.TestDel ete()
lblDeleteResult s.Text = "This would have deleted" & TestID
Products.DataSo urce = objTest.TestGri dviewBind
Products.DataBi nd()
End If
Next
But it does not work
Pls help me out.
Comment