CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Delete all searched

Print topic Send  topic

Author Message
wzuend

Posts: 7
Posted: 04/08/2005, 1:07 AM

Hi
I have a editable grid with some search options. In some cases the user of the application wants to delete all records matching the search criteria. (Result can be spread among 2 or 3 pages, so just checking all delete checkbox would not be accepted)
Is there a simple way of doing it. maybe a delete bottom next to search with some code ?
Thanks
View profile  Send private message
zeuch


Posts: 25
Posted: 04/08/2005, 5:29 AM

You can try to put a delete button and write a code that delete you record using the same where cluse you use in editable grid, getting the url parameters.

But this is not recomended, because you can delete wrong records in the others pages if you don't see them.

Also you can try to create a checkbox that check all delete checkboxes in the page whit javascript code. So you need do it in all pages and that is safer.

Best regards,
Matheus
_________________
Matheus Zeuch
View profile  Send private message
navneet
Posted: 04/15/2005, 1:20 PM

assuming you r using ASP

add a button to the grid and caption it delete all selected

and then onclick event of the button, server side add code.

Dim ErrorMessage2

dim r2
Dim Conn2
Set Conn2 = New clsDBConnectionX ' X is the connection number
Conn2.Open

Dim SQL2
SQL2 = """" & GRIDNAME.datasource.SQL & """"
sql2= replace (sql2, "SELECT", "DELETE") & gridname.datasource.where

Conn2.Execute(r2)
ErrorMessage2 = CCProcessError(Conn2)
Conn2.Close
Set Conn2 = Nothing
On Error Goto 0

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.