This topic is locked

Delete records

3/9/2005 9:15:49 AM
ASPRunnerPro General questions
author

How can I not display delete records column after build? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=1207&image=1&table=forumtopics' class='bbc_emoticon' alt=':blink:' />

Sergey Kornilov admin 3/10/2005

Hi,
to remove delete column after build you need to modify two plases on the ..._list.asp page:
1)sub WriteTableHeader

delete the following code section

<TD align=center><img src=images/icon_delete.gif></td>


2) sub loopRs

delete the following code section

> <td align=center valign=middle>

    <%

    nColumns = nColumns + 1

   

    strOwnerID = RemoveWrappers("")

    if strOwnerID<>"" then strOwnerID = rs(strOwnerID)

    if CheckSecurity(strOwnerID, "Delete")=True then %>

   

            <input type=checkbox name=mdelete value=<%=nDelete%>>
            <input type=hidden name=mdelete1 value="<%=rs(strKeyField)%>">

            <% if strKeyField2<>"" then %>

            <input type=hidden name=mdelete2 value="<%=rs(strKeyField2)%>">

            <% end if %>

            <% if strKeyField3<>"" then %>

            <input type=hidden name=mdelete3 value="<%=rs(strKeyField3)%>">

            <% end if

            nDelete = nDelete + 1

    %>

    &nbsp;

    <%

    end if

    %>

   

   

    </td>

Sarjent 3/14/2005

Sergey,
Say I have a field that I call Contacted, it is a bin field with values of 1 or 0. Default value is 0 and it is presented as a checkbox on the edit screen.
I could using this example as a guide, select what records I wanted and let it tickmark all of the selected? I know this is removing that delete field but adding one should be almost the same code as what is deleted here?

Sergey Kornilov admin 3/15/2005

Hi,
this example won't help you.
Please start new thread where you can explain what you trying to build.