View Poll Results: Was this helpful?
- Voters
- 321. You may not vote on this poll
-
Yes - Very Much
247 76.95% -
Yes - Had to tweak it
44 13.71% -
No - Maybe
14 4.36% -
Not at All!!!
16 4.98%
-
17 Jun 2008 7:53 AM #121
First of all... thanks for the answer!
You are rigth... maybe showing both: subtotals ( what the user is looking at ) and totals would make more sense...
Imagine a grid that shows losses and earnings ( with a lot of pages ). The end-user should see the total balance
thoughts?
Lisandro
-
17 Jun 2008 8:01 AM #122
yep, that's exactly what i had in mind.
i have no need for that functionality atm, though it sounds like a fun side-project
let us know if you decide to try your hand at it, and perhaps some of the folk here could chip in along the way.
[edit]
this should be somewhat simpler now, since i've recently refactored the code and added a rowIdx param to the calculation methods.
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
3 Jul 2008 8:16 AM #123
summary cell value?
summary cell value?
Lovely extension, thank you. Question: how to get the value of a summary cell? I've looked all through the summary object using Firebug - no luck. I also checked the Store - seems the Summary data isn't there.
Background: Summary in use on an EditorGrid. Most cells are editable, numeric. The summary values thus change on edit of main content cells. To "save and exit" the EditorGrid, I must check the right-most column's summary cell value and take action based on it's value.
Any ideas?
-
3 Jul 2008 8:49 AM #124
@mcouillard: get a reference to the gridsummaryplugin, call gridsummaryplugin.getSummaryNode() and inspect the appropriate cell for the value you need.
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
3 Jul 2008 9:16 AM #125
exactly...First I assigned
and then, in my grid, I usedCode:var summary = new Ext.ux.grid.GridSummary() ;
so, I could reference summary.getSummaryNode().Code:...plugins: [summary],...
mcouillard, try that and please post results.
-
3 Jul 2008 10:05 AM #126
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
3 Jul 2008 10:15 AM #127
Solved. Thank you both, Mystix and httpdotcom!
Took me a bit longer than I thought to piece together the right methods, but that's mostly due to my inexperience with Ext JS in general. Though, and you may agree even more Mystix, it'd be nice to have the summary data stored in a more approachable place!Code:... var summary = new Ext.ux.grid.GridSummary(); ... plugins: [summary], ... //get the DOM of the summary element, wrap in Ext Element, query the last TD, get the first array element and get the underlying text - no matter how nested var rightMostSummaryCell= Ext.get(summary.getSummaryNode().dom).query('td:last')[0].getText();-Michael B2B web application developer
-
22 Jul 2008 7:38 AM #128
-
22 Jul 2008 7:49 AM #129
check the rest of the thread. someone else has already posted tips on successfully using both gridsummary and groupsummary plugins together.
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
22 Jul 2008 10:37 AM #130
I have fixed the issue with the gridsummary row and groupsummary row not being resized correctly.
Just replace doWidth with this
and replace doAllWidths with thisCode:doWidth : function(col, w, tw) { var s = this.view.summary.dom, gs = this.view.getGroups(), r; s.firstChild.style.width = tw; s.firstChild.rows[0].childNodes[col].style.width = w; for (var i = 0, len = gs.length; i < len; i++) { r = gs[i].childNodes[2]; r.style.width = tw; r.firstChild.style.width = tw; r.firstChild.rows[0].childNodes[col].style.width = w; } },
Code:doAllWidths : function(ws, tw) { var s = this.view.summary.dom, gs = this.view.getGroups(), r, cells, cellsgs, wlen = ws.length; s.firstChild.style.width = tw; cells = s.firstChild.rows[0].childNodes; for (var i = 0, len = gs.length; i < len; i++) { r = gs[i].childNodes[2]; r.style.width = tw; r.firstChild.style.width = tw; cellsgs = r.firstChild.rows[0].childNodes; for (var j = 0; j < wlen; j++) { cells[j].style.width = ws[j]; cellsgs[j].style.width = ws[j]; } } },



Reply With Quote
). if the gridsummary row is toggled, the gridsummary row's columns are resized correctly.