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 -> General/Other

 Sum column in editable grid [SOLVED]

Print topic Send  topic

Author Message
karen

Posts: 99
Posted: 01/08/2009, 9:37 PM

Hi all,

I am trying to sum a column in an editable grid and display this total on the form. I have had a look at the javascript solution (http://forums.codecharge.com/posts.php?post_id=90723&s_keyword=editable+grid+total) but can't get it to work. I use PHP/MySQL. I really appreciate any tips at all. Thanks in advance.
View profile  Send private message
karen

Posts: 99
Posted: 01/11/2009, 1:07 AM

Hi all,

No worries, I got it to work. The code is all good if anyone else needs to do the same. Cheers!
View profile  Send private message
asawyer13

Posts: 46
Posted: 01/11/2009, 6:15 AM

Could you post it so eventually when I need it, it will be available?
Thanks,
Alan
View profile  Send private message
damian

Posts: 838
Posted: 01/11/2009, 6:19 AM

http://forums.codecharge.com/posts.php?post_id=90723&s_...able+grid+total

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
karen

Posts: 99
Posted: 02/25/2009, 8:03 PM

I have a small problem. I have modified the code not to sum the rows that are checked for delete. However, this also excludes new rows. For some reason, the delete_control.checked is returning not true for the new rows even though the control is non-existant. How can I modify the code to exclude rows that are checked to be deleted but include new rows?

Here's the if statement:

if (fin_tithes_paymentsElements[j][fin_tithes_paymentstithes_payment_amtID].value && !fin_tithes_paymentsElements[j][fin_tithes_paymentsDeleteControl].checked)

I hope someone has done this before or has some ideas for me to try. Thanks in advance!

Cheers,
Karen
View profile  Send private message
karen

Posts: 99
Posted: 02/26/2009, 12:55 AM

Ok, in case anyone else tries to do the same, you need to check if the delete control is undefined (for new rows), like so,


if(typeof fin_tithes_paymentsElements[j][fin_tithes_paymentsDeleteControl] == 'undefined')

That solved it! Sorry for making anyone crack their heads like I did mine :P
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.