<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009" creationComplete="hbox1_creationCompleteHandler(event)"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" xmlns:nestedtreedatagrid="com.flexicious.nestedtreedatagrid.*" xmlns:controls="com.flexicious.controls.*">
<fx:Script>
<![CDATA[
import com.flexicious.example.model.billing.LineItem;
import com.flexicious.example.utils.ExampleUtils;
import com.flexicious.example.view.support.ExpandCollapseRenderer;
import com.flexicious.example.view.support.MyPagerControl;
import com.flexicious.nestedtreedatagrid.cells.FlexDataGridColumnGroupCell;
import com.flexicious.nestedtreedatagrid.interfaces.IFlexDataGridCell;
import com.flexicious.nestedtreedatagrid.valueobjects.RowPositionInfo;
import com.flexicious.utils.UIUtils;
import mock.FlexiciousMockGenerator;
import mx.collections.ArrayCollection;
import mx.events.FlexEvent;
import pdf.AlivePdfGenerator;
protected function hbox1_creationCompleteHandler(event:FlexEvent):void
{
}
]]>
</fx:Script>
<fx:Declarations>
</fx:Declarations>
<nestedtreedatagrid:FlexDataGrid id="grid" width="100%" height="100%" enablePrint="true" enablePreferencePersistence="true"
enableExport="true" enableCopy="true" preferencePersistenceKey="simpleGrid"
dataProvider="{FlexiciousMockGenerator.instance().getFlatOrgList()}"
pdfBytesReady="new AlivePdfGenerator().generate(event.target as FlexDataGrid ,event.printOptions)"
enableMultiColumnSort="true" useCompactPreferences="true"
horizontalScrollPolicy="auto" footerDrawTopBorder="true"
>
<nestedtreedatagrid:columnLevel >
<nestedtreedatagrid:FlexDataGridColumnLevel selectedKeyField="id" enablePaging="true" pageSize="50" enableFilters="true"
enableFooters="true" initialSortField="legalName" initialSortAscending="true">
<nestedtreedatagrid:groupedColumns>
<nestedtreedatagrid:FlexDataGridColumn id="colId" dataField="id" headerText="ID" filterControl="TextInput" filterWaterMark="Search"
columnLockMode="left" filterIcon="@Embed(source='/assets/images/clear.png')"
enableFilterAutoComplete="true" clearFilterOnIconClick="true"/>
<nestedtreedatagrid:FlexDataGridColumn id="colLegalName" dataField="legalName"
headerText="LegalName of the Organization"
headerWordWrap="true" truncateToFit="true" columnLockMode="left"/>
<nestedtreedatagrid:FlexDataGridColumnGroup headerText="Address" enableExpandCollapse="true" >
<nestedtreedatagrid:columnGroups>
<nestedtreedatagrid:FlexDataGridColumnGroup headerText="Lines" >
<nestedtreedatagrid:columns>
<nestedtreedatagrid:FlexDataGridColumn id="colLine1" dataField="headquarterAddress.line1" headerText="Line 1" footerLabel="Count:" footerOperation="count"/>
<nestedtreedatagrid:FlexDataGridColumn id="colLine2" dataField="headquarterAddress.line2" headerText="Line 2"/>
</nestedtreedatagrid:columns>
</nestedtreedatagrid:FlexDataGridColumnGroup>
<nestedtreedatagrid:FlexDataGridColumnGroup headerText="Region">
<nestedtreedatagrid:columns>
<nestedtreedatagrid:FlexDataGridColumn id="colCity" dataField="headquarterAddress.city.name" headerText="City" filterControl="MultiSelectComboBox" filterComboBoxWidth="150" filterComboBoxBuildFromGrid="true"/>
<nestedtreedatagrid:FlexDataGridColumn id="colState" dataField="headquarterAddress.state.name" headerText="State" filterControl="MultiSelectComboBox" filterComboBoxWidth="150" filterComboBoxBuildFromGrid="true"/>
<nestedtreedatagrid:FlexDataGridColumn id="colCountry" dataField="headquarterAddress.country.name" headerText="Country" filterControl="MultiSelectComboBox" filterComboBoxWidth="150" filterComboBoxBuildFromGrid="true"/>
</nestedtreedatagrid:columns>
</nestedtreedatagrid:FlexDataGridColumnGroup>
</nestedtreedatagrid:columnGroups>
</nestedtreedatagrid:FlexDataGridColumnGroup>
<nestedtreedatagrid:FlexDataGridColumnGroup headerText="Financials">
<nestedtreedatagrid:columns>
<nestedtreedatagrid:FlexDataGridColumn headerWordWrap="true" headerAlign="right" id="colAnnRev" dataField="annualRevenue" headerText="Annual Revenue"
textAlign="right" footerLabel="Avg:" footerOperation="average" footerAlign="center" footerOperationPrecision="2"
footerFormatter="{ExampleUtils.globalCurrencyFormatter}"
labelFunction="UIUtils.dataGridFormatCurrencyLabelFunction"
filterControl="NumericRangeBox"/>
<nestedtreedatagrid:FlexDataGridColumn headerWordWrap="true" headerAlign="right" id="colNumEmp" dataField="numEmployees" headerText="Num Employees" textAlign="right" footerLabel="Avg:" footerOperation="average" footerOperationPrecision="2" footerFormatter="{ExampleUtils.globalCurrencyFormatter}" labelFunction="UIUtils.dataGridFormatCurrencyLabelFunction"/>
<nestedtreedatagrid:FlexDataGridColumn headerWordWrap="true" headerAlign="right" id="colEPS" dataField="earningsPerShare" headerText="EPS" textAlign="right" footerLabel="Avg:" footerOperation="average" footerFormatter="{ExampleUtils.globalCurrencyFormatter}" labelFunction="UIUtils.dataGridFormatCurrencyLabelFunction"/>
<nestedtreedatagrid:FlexDataGridColumn headerWordWrap="true" headerAlign="right" id="colStockPrice" dataField="lastStockPrice" headerText="Stock Price"
textAlign="right" footerLabel="Avg:" footerOperation="average" footerOperationPrecision="2" footerFormatter="{ExampleUtils.globalCurrencyFormatter}" labelFunction="UIUtils.dataGridFormatCurrencyLabelFunction"/>
</nestedtreedatagrid:columns>
</nestedtreedatagrid:FlexDataGridColumnGroup>
</nestedtreedatagrid:groupedColumns>
</nestedtreedatagrid:FlexDataGridColumnLevel>
</nestedtreedatagrid:columnLevel>
</nestedtreedatagrid:FlexDataGrid>
</mx:HBox>