When I goupby and summary some rows. The summary infomation is displayed as a string, It looks not very clear.I have 2 questions.
1. Can I use a template on the summay infomation?
2. Can I display the summary infomation align with each column? Like the following diagram.
Any way, Thanks for your help.
I'd like to know when can I get your next release(2012.2)?
Hi Spark,
I have to applogize for misleading you - I had misunderstood you from the begining :(
So the groupedRowTextTemplate option can be used in very basic scenarios and it's not meant to template summaries, let alone an entire table.
Our RnD department informed me that we do have a backlog item for the future release (2012.2) to add exactly what you are looking for: a summaries table for each group.
So currently having such a summaries table is not possible, but we will be a part of the GroupBy feature's future out-of-the-box arsenal.
The picture is always disappeared. I will upload the pic soon.
As your suggestion, I set groupedRowTextTemplate like "<table><tr><td>${key}: ${val} (${count})</td><td>${key}: ${val} (${count})</td><td>${key}: ${val} (${count})</td></tr></table>".
But only first <td> is binding to the template. Like follwoing picture.
I'd like to display Units Sum and MarketValueSum in second and third cell.
I think we should bind some variables, but not ${key}: ${val} (${count}.
I think ${key}: ${val} (${count} are just used for first cell.
Is that each summed column has it's own variable ?
Following is my code.
That's just it: the grouped row you are trying to template has a single cell for the group summary.In order to get the desired result, you will need to create a template in which, if I may suggest, you will need to place an HTML <table> with a 1 row and a single cell for each column, thus mimicking the column headers row.
Something like this: groupedRowTextTemplate: "<table><tr><td>${key}: ${val} (${count})</td><td>${key}: ${val} (${count})</td><td>${key}: ${val} (${count})</td></tr></table>",
1. You will need to use the {{if}} templating tag in order to display values in the grouped column's cells in this group summary row.
2. You will need to handle this widths of this table's cells manually so that they are aligned
Defining the table in the group summary row might not be that trivial so I suggest you get yourself familiar with jQuery templating and then go for the group summary row you desire.
Again, this is simply my suggestion - if you start investigating and experimenting you may come across a better or easier way to accomplish your goal.
Cheers,
Borislav