Gridview with checkbox control in gridview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LipsaPattanayak
    New Member
    • Sep 2008
    • 1

    Gridview with checkbox control in gridview

    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.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    what does TestDelete() do ?

    Comment

    Working...