Rendezvous with technology

Accessing Grouping.label in Summary Rows in AdvancedDataGrid

Posted by: Sameer on: December 6, 2007

The GroupLabel specified while creating a GroupingCollection can be accessed while displaying summaries in AdvancedDataGrid.

Although, accessing the GroupLabel in summary rows can be quite a tedious task but it can be very useful.

Here is a sample. In this sample, the Group name is displayed in the summary rows along with the value for the summary.

Source -

6 Responses to "Accessing Grouping.label in Summary Rows in AdvancedDataGrid"

How can I create a total for multiple number columns?

eg.

Column A B C
10 10 10
20 30 40
Total 30 40 50

Sreenivas has posted some nice samples about Summaries –
http://flexpearls.blogspot.com/search?q=summary

Let me know if you are looking for something else.

Hey Sameer,
I’m using the groupLabelFunction to set the name of the groups in my chart. Is there a way to be able to extend the width of the group label name? For example if I want my group name to span more than one column can I do that or is my label limited to the width of the first column its in?

You can use rendererProvider property on the AdvancedDataGrid and set the columnSpan property in the RendererProvider.

Hi,
I was wondering, is there a way to make summaries recalculate after you edit the data in the group? (this is when you present a summary but the, but the column is editable so you change the value, but the summary wont, therefore being incorrect after the edit)

So, the summaries will be updated automatically if the data changes. But you have to make sure that the data rows are Bindable. If you are using Objects then changing the data values will not result in summary updation because Objects does not dispatch any event for property value changes. Using ObjectProxy instead of Obect can re-solve this.

You can also use ICollectionView.itemUpdated() whenever any property changes.

Leave a Reply