0 Replies Latest reply on May 29, 2009 7:54 AM by wilstyx

    AdvancedDataGrid Keyboard Not responding


      Well trying to learn Flex but ran into a problem. Using AdvancedDataGrid in a seperate window and the keyboard shortcuts do not work.


      Opening the window with Listtest.open() From a WindowedApplication;  Below is the code for the window. The Keyboard Event was added to try and figure out what was going on and id shows that the grid is ( I think) getting the keystrokes. Anybody have any ideas ?


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Window xmlns:mx="http://www.adobe.com/2006/mxml" width="564" height="486" title="testType"


              import mx.collections.ArrayCollection;
              import mx.events.AdvancedDataGridEvent;
              private var em:EntityManager = EntityManager.getInstance();       
              [Bindable] private var contacts:ArrayCollection;




          private function init():void
                   adg1.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
          contacts = em.findAll(Contact);


      private function keyHandler(event:KeyboardEvent):void {
                  t1.text = event.keyCode + "/" + event.charCode;



          <mx:Canvas width="560" height="482">
              <mx:AdvancedDataGrid x="10" y="28" id="adg1" designViewDataType="flat" dataProvider="{contacts}" height="437" width="497" liveScrolling="false">
                      <mx:AdvancedDataGridColumn headerText="Last Name" dataField="lastName"/>
                  <mx:AdvancedDataGridColumn headerText="First Name" dataField="firstName"/>
                  <mx:AdvancedDataGridColumn headerText="Home Phone" dataField="HOME"/>
               <mx:Text id="t1" x="10" y="0" width="217"/>