Hi..
In my datalist, when i try to delete a particular parent record ,it will display an alert message ("unable to request process").the checkbox is still checked after loading the page.Can you pls temme how to uncheck the checkbox??
Regards,
Shravs
Code:
Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click
Dim chkBtndel As CheckBox
Dim strID As String = ""
Dim count As Integer = 0
Dim objdel As ProjectsProcessData = New ProjectsProcessData()
Dim arrOItems As ArrayList = New ArrayList()
Dim objdele As TR_Projects = New TR_Projects()
Try
For Each dataitem As DataListItem In DLProjects.Items
If dataitem.ItemType = ListItemType.Item Or dataitem.ItemType = ListItemType.AlternatingItem Then
' -- Find all the item
' Dim objNewEmp As New FAMS.EntityClass.SVCEmployee
chkBtndel = dataitem.FindControl("chkRemovePart")
Dim lblProId As LinkButton = dataitem.FindControl("HyperID")
If chkBtndel.Checked = True Then
strID += lblProId.ToolTip + ","
End If
End If
Next
strID = strID.Substring(0, strID.Length - 1)
count = objdele.DeleteProjectsRecords(strID)
If count > 0 Then
ShowMessage("Records Deleted Successfully")
BindDataList()
Else
ShowMessage("Unable To Request Process")
End If
Catch ex As Exception
End Try
End Sub
Regards,
Shravs
Comment