0 Replies Latest reply on Nov 15, 2009 1:20 PM by machelslack_31

    Binding a datagrid to a datechooser

    machelslack_31

      Hello Folks,

       

      Does anyone know how to bind an xml list to a datagrid or Tile List through a change event of a datechooser control. I.E set the dataProvider of the datagrid to a month within the year.

       

       

      So far i have:

       

       

       

      private function initialised():void {

       

      tlist.dataProvider = dateChChChooser.monthNames[dateChChChooser.displayedMonth]

       

      }

       

      called through the change event of a dateChooser. On calling the method i get an error pop stating

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

      at ERUV_VERSION_1/initialised()[/Users/machelbryan-slack/Documents/Flex Builder 3/ERUV_VERSION_1/src/ERUV_VERSION_1.mxml:145]

      at ERUV_VERSION_1/__dateChChChooser_change()[/Users/machelbryan-slack/Documents/Flex Builder 3/ERUV_VERSION_1/src/ERUV_VERSION_1.mxml:780]

      at flash.events::EventDispatcher/dispatchEventFunction()

      at flash.events::EventDispatcher/dispatchEvent()

      at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9298]

      at mx.controls::DateChooser/dateGrid_changeHandler()[C:\autobuild\3.2.0\frameworks\projects\ framework\src\mx\controls\DateChooser.as:2886]

      at flash.events::EventDispatcher/dispatchEventFunction()

      at flash.events::EventDispatcher/dispatchEvent()

      at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9298]

      at mx.controls::CalendarLayout/http://www.adobe.com/2006/flex/mx/internal::dispatchChangeEvent()[C:\autobuild\3.2.0\frame works\projects\framework\src\mx\controls\CalendarLayout.as:1727]

      at mx.controls::CalendarLayout/mouseUpHandler()[C:\autobuild\3.2.0\frameworks\projects\frame work\src\mx\controls\CalendarLayout.as:2422]