3 Replies Latest reply on Jun 18, 2009 10:50 AM by Flex harUI

    DataGrid header click

    Zolotoj Level 3

      I have a custom header renderer for one of datagrid's columns.

      Here is a fragment of my code:

       

      override
      
      
       protected function createChildren() : void{
      
      if (plusIcon == null){
      
      
      var plusIcon:Image = new Image();plusIcon.buttonMode = 
      
      true;plusIcon.useHandCursor = 
      
      true;plusIcon.toolTip = 
      
      "Add Contact";plusIcon.addEventListener(
      
      "click", onAddContactClick);plusIcon.source = imgClass; 
      addChild(plusIcon);
      validateNow();
      } 
      }
      
      
      
      


      I need to catch a click on it so, I am adding a click listener. It works fine as long as datgrid is not in an editing mode means no cell is selected. But if a cell is selected and it is in the editing mode clicking on a header in question finishes editing mode but its click listener is not called.

      What am I missing here?

       

      Thanks