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.
Hi Spark,
1. I believe that the groupedRowTextTemplate option of the igGridGroupBy feature is what you are looking for. You can find more details about it here:https://www.igniteui.com/help/api/2019.1/ui.iggridgroupby_hg
2. About the summary information alignment - I believe that it's fully customizable (for example if you wrap it in a <div>, you can align that with any column you like).
Unfortunately I cannot see the image you added in your post so I cannot see what you are aiming for.
Can you please re-upload it so we can take a look?
Thanks in advance!
Cheers,
Borislav
Hi Borislav.
Thanks for you reply.
I have reloaded the images.
Thank you!
Your reply is very helpfull.
I have another question. If I want to template a summed column, Which Value should be write into template. Could you give me a short code snap?
Sure thing.
Here's the updated description of the groupedRowTextTemplate option:
Template for the grouped row's text, follows jQuery's templating guidelines. Variables available for the template are ${key}, ${val} and ${count}.
So the shortest snippet I can give you off the bat is the option's default value:
groupedRowTextTemplate: "${key}: ${val} (${count})",
So ${key} is the key of the grouped column.
${val} is the current value of the grouped column.
${count} is the number of rows for the current group.
Thus, you can template only the ${val} and ${count} variables because you will be aligning the summary under the grouped column's header cell (making ${key} rather irrelevant).
Hope this is enough to get you a under way with the template.
http://i.6.cn/cvbnm/2c/36/2d/9e122dbe95ef9ddb92857cea55d4e338.jpg
You can get the complete picture here.
My question is if I want to template "Standard Cost" column. Which Value I should set into template?
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.
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.
We also require this functionality. Seems like a pretty basic/standard idea for a GroupBy summary row.
Did you ever implement this (allowing summaries for individual columns in the group header...DevExpress has an alignByColumn option that does this). I can tell you that you missed out on a sale because of the lack of this one feature, we would have bought 4+ licenses if this was available.
Hi Andrew,
Unfortunately the backlog item about this improvement to the Group-by feature I mentioned earlier wasn't on the top priority list of our RnD team.With this in mind, they do know about such improvement requests, but unfortunately, they (the team) need to go through the list taking into account backlog item priority.In order to make customer-requested improvements and new features more likely to receive a high backlog priority, we have introduced the new customer feedback system:http://ideas.infragistics.com/It's User Voice-powered and allows us to have a greater visibility of the multitude of ideas coming from customer feedback.As you can see, Ignite UI shares the 3rd place for most feedback-ed product along with NucliOS so there are other people like you out there and we're listening to you.Hope this helps!Bobby
I am looking for this same functionality. You mentioned it would be available as an out of box solution in 2012.2. I am using 2013.1 but I don't see how to implement this yet. Has this been included yet and if so, how does it work?
thanks
Seeing as how it will be the 2nd release for this year, it's most probably scheduled for the fall of this year - I don't know of an estimated date for 2012.2, but it should be available at the last quarter of this year at max.
If there's anything else we can help you with in the meantime, please let us know.
PS: Our upcoming release 2012.1 will be available within a few weeks from now.