Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ideas on how to remove record from DTC Grid?

Status
Not open for further replies.

Frank123

MIS
Sep 17, 2001
77
US
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:
=&quot;<input type=checkbox Name=check value=no&quot;

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(&quot;Interface&quot;).Count
if Request.Form(&quot;check&quot;)= &quot;no&quot; 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

 
I figured it out finally. I wasn't thinking about checkbox values correctly. Eventually, I set value of the checkbox to \\\&quot;&quot; + Server.HTMLEncode([Interface_id]) + &quot;\\\&quot;, added a for loop and it works. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top