Sigma Php Ajax framework, Ajax Components, GUI Builder
May 21, 2012, 09:32:49 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
Sigma Php Ajax framework, Ajax Components, GUI Builder
>
Sigma Grid
>
Sigma Grid - Q&A
(Moderators:
steven
,
gbolanoscruz
) >
subtotal display?
Pages: [
1
]
« previous
next »
Print
Author
Topic: subtotal display? (Read 727 times)
chaze
Jr. Member
Posts: 9
subtotal display?
«
on:
July 07, 2009, 07:04:24 AM »
Hello!
I need to calculate the subtotal of each column and display at the 1st or last row of the grid.
do you know any convenient way to do it? I am thinking to add extra row the end. however, this mean the grid can't not sort.
any idea will be appreciated!
thanks!
Jim
Logged
steven
Moderator
Hero Member
Posts: 544
Re: subtotal display?
«
Reply #1 on:
July 07, 2009, 05:57:41 PM »
For work around, you need to do a customized sorting.
Make it clearer, for example, you could add an extra field to indicate if it's a subtotal.
When you do a customized sorting, determine if it's a subtotal by that extra field.
See
http://www.sigmawidgets.com/products/sigma_grid2/demos/example_customized_sort.html
to define a sort rule
Logged
Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java
Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
chaze
Jr. Member
Posts: 9
Re: subtotal display?
«
Reply #2 on:
July 13, 2009, 05:48:06 AM »
Hello,
I defined below function for sorting. I am able to freeze the subtotal/average row at bottom.
However, the sorting does not sort correctly.
function sort_fnt(r1,r2){
if ( r1.ctrlflag1.replace(/^\s+|\s+$/g,"")!="1" )
return 1;
else {
return -1;
}
}
I tried return 0 on 2nd logic which make sorting not move. I dont want to do the custom sort by subtract on r1/r2 as i need to support all column sorting which means i need to have same number of sort function defined. (eg r1.columnA - r2.columnB ...)
Any help?
Jim
Logged
chaze
Jr. Member
Posts: 9
Re: subtotal display?
«
Reply #3 on:
July 15, 2009, 12:15:08 AM »
Any help sir?
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News & Announcements
-----------------------------
Sigma Visual GUI Builder & Library
-----------------------------
=> Sigma Visual - Knowledge Share
=> Sigma Visual - Q&A
=> Bug Report & Wishlist
-----------------------------
Sigma Grid
-----------------------------
=> Sigma Grid - Q&A
=> Show Case
=> Bug Report & Wishlist
-----------------------------
Other
-----------------------------
=> AJAX & JavaScript
Loading...