1 Reply Latest reply on Sep 8, 2011 1:29 PM by Code Girl

    Outside Data

    Code Girl Level 1

      I have an app which has a start and end date fields and then calls a gantt Chart generator

       

          <s:Label x="0" y="5" text="Min Date" height="24"
                   fontFamily="Times New Roman" verticalAlign="middle" color="white" fontSize="12"/>
          <mx:DateField id="startDateField"
                        x="50" y="5"
                        formatString="MM-DD-YYYY"
                        selectedDate="{_startDate}"
                        change="startDatefield_changeHandler(event)"/>
          <s:Label x="150"  y="5" text="Max Date" height="24"
                   fontFamily="Times New Roman" verticalAlign="middle" color="white" fontSize="12"/>
          <mx:DateField id="endDateField"
                        x="200" y="5"
                        formatString="MM-DD-YYYY"
                        selectedDate="{_endDate}"
                        change="endDatefield_changeHandler(event)"/>
          <mx:Canvas id="cvs" width="95%" height="600" x="0" y="40">
              <com:DateTimeLineGenerator id="gc" width="100%" height="100%"
                                         dparr="{getUsersResult.lastResult}" 
                                         initialize="gc_initializeHandler(event)"/>

       

      Inside the generator, it generates the header information.  I am able to get the start  and end Date by calling parentDocument._startDate.

      inside the generator, it uses an advanced data grid and it also assigns a dataRenderer which is a mxml file.  How can I get the _startDate inside the renderer

       

                  _adg.horizontalScrollPosition=0
                  _adg.groupedColumns = grpColsArray;
                  _adg.headerRenderer = new ClassFactory(LabelHeaderRenderer);
                 
                  _adg.validateNow();
                 
                  var rparray:Array = new Array();
                  var rp:AdvancedDataGridRendererProvider = new AdvancedDataGridRendererProvider();
                  rp.columnIndex=1;
                  rp.columnSpan=0;
                  rp.renderer= new ClassFactory(DataRenderer);
                  rparray.push(rp)
                 
                 
                  _adg.rendererProviders = rparray;
                  _adg.lockedColumnCount=1
                  _adg.validateNow();