1 Reply Latest reply on Oct 12, 2009 10:59 PM by Kameshwaran.Anandan

    Advanced Data Grid with Count only returns zero

      I'm just getting started with Flex and currently having problems getting the AdvancedDataGrid to count the total number of records for a group. I have the following for the control but all I get in the StudentCount column is 0 for all grouped rows. Can someone point me in the right direction?

      Thanks!

       

      <mx:Panel x="75" y="10" width="933" height="797" layout="absolute">       
             
              <mx:AdvancedDataGrid x="65" y="10" id="adg1" designViewDataType="tree" width="821.5"  enabled="true" initialize="gc.refresh();" height="406" selectionMode="singleCell" editable="true">
              <mx:dataProvider>
                  <mx:GroupingCollection id="gc" source="{dataXML.ROW}">
                 
                          <mx:Grouping>
                              <mx:GroupingField name="APPLS_AREA_OF_INTEREST_DESC"/>
                         
                              <mx:GroupingField name="APPLS_APDC_DESC">
                                     <mx:SummaryRow summaryPlacement="group">
                                            <mx:SummaryField dataField="APPLS_SSN_FRMT"
                                              label="StudentCount" operation="COUNT"/>
                                        </mx:SummaryRow>
                              </mx:GroupingField>
                          </mx:Grouping>
                 
                  </mx:GroupingCollection>
              </mx:dataProvider>
                  <mx:columns>
                      <mx:AdvancedDataGridColumn headerText="Interest Desc" dataField="APPLS_AREA_OF_INTEREST_DESC"/>
                      <mx:AdvancedDataGridColumn headerText="Interest Code" dataField="APPLS_AREA_OF_INTEREST_CODE"/>
                      <mx:AdvancedDataGridColumn headerText="Total Students" dataField="StudentCount"/>
                      <mx:AdvancedDataGridColumn headerText="Darton ID" dataField="APPLS_SSN_FRMT"/>
                      <mx:AdvancedDataGridColumn headerText="Name" dataField="APPLS_FULLNAME_LFM"/>
                      <mx:AdvancedDataGridColumn headerText="Phone" dataField="APPLS_PHONE_NUMBER"/>
                      <mx:AdvancedDataGridColumn headerText="APDC Desc" dataField="APPLS_APDC_DESC"/>
                      <mx:AdvancedDataGridColumn headerText="APDC Code" dataField="APPLS_APDC_CODE"/>
                  </mx:columns>
              </mx:AdvancedDataGrid>
          </mx:Panel>
      </mx:Application>