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 Problem

Print topic Send  topic

Author Message
testmail

Posts: 3
Posted: 02/10/2011, 2:11 AM

Hi, any one tell me how to avoid unneccessary update of the row if I am only update one row at a time. in editable grid.

we are using created date , modified date in the table. when we update something from editable grid then all the modified date is change to same.

Thanks,

:)
View profile  Send private message
JayEdgar


Posts: 77
Posted: 02/10/2011, 8:37 AM

Add a hidden field. When any value on the row changes, update the hidden field. Then, when processing, check and see if the hidden value is changed. if not, don't execute update.

The javascript:
<script language="JavaScript" type="text/javascript">  
function SetChanged(RowName) {  
document.getElementById(RowName).value = 1;  
}  
</script>

In the controls:
<input type="checkbox" value="1"     name="{Deleted_Name}" onclick="SetChanged('{Row_Name}')" {Deleted}>  
<input type="hidden"   value="{Row}" name="{Row_Name}" id="{Row_Name}">

Before build update, insert and delete:
global $Form_Name;  
  
if ($Form_Name->Row->GetValue() == null)  
    $Form_Name->Row->SetValue(0)

Then before execute update, insert and delete:
global $Form_Name;  
  
$Form_Name->ds->CmdExecution = $Form_Name->Row->GetValue();  

Cheers!

Jay
View profile  Send private message
testmail

Posts: 3
Posted: 02/11/2011, 10:24 PM

Hi Jay,
This solution is working.

Yessoftware also need to include this script. also give us the option to adit trail.

Thanks
Abhay
View profile  Send private message

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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