By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,871 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,871 IT Pros & Developers. It's quick & easy.

Gridview with checkbox control in gridview

P: 1
I am using the following code for deleting the checked record.

--- For Each row In Products.Rows
var = Convert.ToInt32(Products.DataKeys(row.RowIndex).Va lue)
Dim cb As CheckBox = row.FindControl("ProductSelector")
If cb IsNot Nothing And cb.Checked = True Then
'If cb.Checked = True Then
atLeastOneRowDeleted = True
Dim TestID As Integer = _
Convert.ToInt32(Products.DataKeys(row.RowIndex).Va lue)
objTest.TestId = Convert.ToInt32(Products.DataKeys(row.RowIndex).Va lue)
objTest.TestDelete()
lblDeleteResults.Text = "This would have deleted" & TestID
Products.DataSource = objTest.TestGridviewBind
Products.DataBind()
End If
Next

But it does not work
Pls help me out.
Sep 20 '08 #1
Share this Question
Share on Google+
1 Reply


debasisdas
Expert 5K+
P: 8,127
what does TestDelete() do ?
Sep 20 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.