title: Can i make a pivot like application using Advanced Datagrid?
body: <p>I want to capture the header click event and on click , i want to split the columns ,by adding the AdvancedDatgridColumnGroup dynamicaly at each level.Is it feasible? Atleast help me with capturing the header click event.Please do not suggest OLAP .I want to explore the advanced datagrid option more.</p>
  
  <pre><code>&lt;mx:AdvancedDataGrid x="6" y="4" id="adg0" designViewDataType="flat" width="947" height="357" click="summaryViewStack.selectedIndex = 1" fontFamily="Verdana" fontSize="10"&gt;
  
  
  
                      &lt;mx:groupedColumns&gt;
                      &lt;mx:AdvancedDataGridColumn headerText="Cluster" dataField="label" /&gt;
  
                      &lt;mx:AdvancedDataGridColumnGroup headerText="Revenue" &gt;
                              &lt;mx:AdvancedDataGridColumn headerText="April" dataField="data1"/&gt;
                                 &lt;mx:AdvancedDataGridColumn headerText="May" dataField="data2"/&gt;
                                    &lt;mx:AdvancedDataGridColumn headerText="June" dataField="data3"/&gt;
                                    &lt;mx:AdvancedDataGridColumn headerText="Q1" dataField="data4"/&gt;
                                    &lt;/mx:AdvancedDataGridColumnGroup&gt;
                      &lt;mx:AdvancedDataGridColumnGroup headerText="Headcount" &gt;
                              &lt;mx:AdvancedDataGridColumn headerText="April" dataField="data1"/&gt;
                                &lt;mx:AdvancedDataGridColumn headerText="May" dataField="data2"/&gt;
                                   &lt;mx:AdvancedDataGridColumn headerText="June" dataField="data3"/&gt;
                                   &lt;mx:AdvancedDataGridColumn headerText="Q1" dataField="data4"/&gt;
                                   &lt;/mx:AdvancedDataGridColumnGroup&gt;
                                      &lt;mx:AdvancedDataGridColumnGroup headerText="Effort" &gt;
                                      &lt;mx:AdvancedDataGridColumn headerText="April" dataField="data1"/&gt;
                                      &lt;mx:AdvancedDataGridColumn headerText="May" dataField="data2"/&gt;
                                      &lt;mx:AdvancedDataGridColumn headerText="June" dataField="data3"/&gt;
                                      &lt;mx:AdvancedDataGridColumn headerText="Q1" dataField="data4"/&gt;
                                      &lt;/mx:AdvancedDataGridColumnGroup&gt;
  
                           &lt;/mx:groupedColumns&gt;
                  &lt;/mx:AdvancedDataGrid&gt;
              &lt;/mx:Canvas&gt;
              &lt;mx:Canvas label="Accountwise Summary" width="100%" height="100%"&gt;
                  &lt;mx:AdvancedDataGrid x="6" y="4" id="adg1" designViewDataType="flat" width="947" height="357" click="summaryViewStack.selectedIndex = 1" fontFamily="Verdana" fontSize="10"&gt;
                     &lt;mx:dataProvider&gt;
                       &lt;mx:ArrayCollection&gt;
                          &lt;mx:Object label="1800-Flowers" data1="20" data2="30" data3="40" data4="90" /&gt;
                          &lt;mx:Object label="The Home Depot" data1="20" data2="30" data3="40" data4="90" /&gt;
                          &lt;mx:Object label="Nielsen" data1="20" data2="30" data3="40" data4="90" /&gt;
                          &lt;mx:Object label="Nokia" data1="20" data2="30" data3="40" data4="90" /&gt;
                       &lt;/mx:ArrayCollection&gt;
                     &lt;/mx:dataProvider&gt;
  
  
                      &lt;mx:groupedColumns&gt;
                      &lt;mx:AdvancedDataGridColumn headerText="Account" dataField="label"/&gt;
  
                      &lt;mx:AdvancedDataGridColumnGroup headerText="Revenue" &gt;
                              &lt;mx:AdvancedDataGridColumn headerText="April" dataField="data1"/&gt;
                                 &lt;mx:AdvancedDataGridColumn headerText="May" dataField="data2"/&gt;
                                    &lt;mx:AdvancedDataGridColumn headerText="June" dataField="data3"/&gt;
                                    &lt;mx:AdvancedDataGridColumn headerText="Q1" dataField="data4"/&gt;
                                    &lt;/mx:AdvancedDataGridColumnGroup&gt;
                      &lt;mx:AdvancedDataGridColumnGroup headerText="Headcount" &gt;
                              &lt;mx:AdvancedDataGridColumn headerText="April" dataField="data1"/&gt;
                                &lt;mx:AdvancedDataGridColumn headerText="May" dataField="data2"/&gt;
                                   &gt;&lt;mx:AdvancedDataGridColumn headerText="June" dataField="data3"/&gt;
                                   &lt;mx:AdvancedDataGridColumn headerText="Q1" dataField="data4"/&gt;
                                   &lt;/mx:AdvancedDataGridColumnGroup&gt;
                                      &lt;mx:AdvancedDataGridColumnGroup headerText="Effort" &gt;
                                      &lt;mx:AdvancedDataGridColumn headerText="April" dataField="data1"/&gt;
                                      &lt;mx:AdvancedDataGridColumn headerText="May" dataField="data2"/&gt;
                                      &lt;mx:AdvancedDataGridColumn headerText="June" dataField="data3"/&gt;
                                      &lt;mx:AdvancedDataGridColumn headerText="Q1" dataField="data4"/&gt;
                                      &lt;/mx:AdvancedDataGridColumnGroup&gt;&lt;/mx:groupedColumns&gt;
                  &lt;/mx:AdvancedDataGrid&gt;
  </code></pre>