At the time I've got a DTC Grid in which the user can add new records and also update existing records. Now I can't figure out a way to delete records. I tried the following:
1. Added a unbound column in the grid which has a checkbox
2. Added a dtc button (to remove all checked records when clicked.
I've got the following code in the grid:
="<input type=checkbox Name=check value=no"
And I have the following code on my ASP for my remove button:
Sub btnRemove_onclick()
If Request.Form.Count > 0 Then
For i = 1 to Request.Form("Interface".Count
if Request.Form("check"= "no" then
thisPage.createDE
DE.DeleteInterface
End If
Next
End If
End Sub
In my DeleteInterface Data Command I've got the following line in:
delete from interfaces (system_site_id, interface)
I'm having troubles with the checkboxes because it's never getting in my for loop if I have the checkboxs checked or unchecked. So really I don't know if my data command will actually delete the right record.
If any of you could give me some advice, or know of an easier way of doing this I'd appreciate it much. Thanks
1. Added a unbound column in the grid which has a checkbox
2. Added a dtc button (to remove all checked records when clicked.
I've got the following code in the grid:
="<input type=checkbox Name=check value=no"
And I have the following code on my ASP for my remove button:
Sub btnRemove_onclick()
If Request.Form.Count > 0 Then
For i = 1 to Request.Form("Interface".Count
if Request.Form("check"= "no" then
thisPage.createDE
DE.DeleteInterface
End If
Next
End If
End Sub
In my DeleteInterface Data Command I've got the following line in:
delete from interfaces (system_site_id, interface)
I'm having troubles with the checkboxes because it's never getting in my for loop if I have the checkboxs checked or unchecked. So really I don't know if my data command will actually delete the right record.
If any of you could give me some advice, or know of an easier way of doing this I'd appreciate it much. Thanks