<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" 
         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.*">
    <fx:Script>
        <![CDATA[
            import com.flexicious.example.utils.ExampleUtils;
            import com.flexicious.nestedtreedatagrid.cells.FlexDataGridCell;
            import com.flexicious.nestedtreedatagrid.cells.FlexDataGridDataCell;
            import com.flexicious.nestedtreedatagrid.events.FlexDataGridEvent;
            import com.flexicious.nestedtreedatagrid.interfaces.IFlexDataGridCell;
            import com.flexicious.nestedtreedatagrid.interfaces.IFlexDataGridDataCell;
            import com.flexicious.utils.UIUtils;
            
            import mock.FlexiciousMockGenerator;
            
            import mx.controls.Tree;
            import mx.core.UITextField;
            
            private function getRowBackground(cell:IFlexDataGridCell):*{
                if(cell.rowInfo.data.headquarterAddress.state.name=="New York"){
                    return 0xCFCFCF;
                }else if(cell.rowInfo.isFillRow){
                    return [0xCFCFCF,0xFFFFFF]
                }
                return null;
            }
            private function getRowTextColor(cell:IFlexDataGridCell):*{
                if(cell.rowInfo.data.headquarterAddress.state.name=="New York"){
                    return 0xCC3300;
                }
                return null;
            }
            
            private function getColumnBackground(cell:IFlexDataGridCell):*{
                if(cell.level.selectedKeys.contains(UIUtils.resolveExpression(cell.rowInfo.data,cell.level.selectedKeyField))){
                    return grid.getStyle("selectionColor");
                }
                var val:*=U