CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Editable Grid with delete checkbox BeforeExecuteDelete

Print topic Send  topic

Author Message
oasisp

Posts: 38
Posted: 04/07/2017, 2:31 PM Quote message

i have Editable Grid with delete checkbox.
so user can select multiple checkbox to delete items from table(grid).

i need logged before user delete items from table. BeforeExecuteDelete
basically i need items user selected only for delete. items to delete on editable grid insert on new table for logging.

dont know how to implement on BeforeExecuteDelete. appreciate your help
View profile  Send private message
MichaelMcDonald

Posts: 612
Posted: 04/25/2017, 12:22 AM Quote message

It''s $db connection heavy but you can use the on validate row to get the checkbox value and any field from the row and insert those values into a table.
_________________
Central Coast, NSW, Australia.

Use the EXETA Online Business Valuation Tool to
value your business.

www.exeta.com.au
View profile  Send private message
eratech


Posts: 513
Posted: 08/31/2017, 1:10 AM Quote message

@oasisp - you can certainly do it with the BeforeExecuteDelete to collect the values from the form and executing some Custom SQL to put it in the table. This will execute once for each ticked row. The correct 'row' detail will be collected so you don't need to keep track.

(this isn't working code but should give a pointer)

function EditableGrid_ds_BeforeExecuteDelete

$EditableGrid_ds_BeforeExecuteDelete = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $EditableGrid; //Compatibility

// get the values from the Edittable Grid and add them to the Custom SQL
$db = new clsDBConnection1();
$SQL = "INSERT INTO backuplog (status, userid) ".
"VALUES (". $db->ToSQL($Container->status->GetFormattedValue() ,ccsInteger) .",". $db->ToSQL(CCGetUserID(),ccsInteger) .")";

$db->query($SQL);
$db->close();
}


Cheers

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message

Add new topic Reply to 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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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