0 Replies Latest reply on Dec 13, 2007 11:27 AM by lian360

    DataGrid tooltip doesn't work for customized itemRenderer

    lian360
      I have a DataGrid with one column is a customized renderer, when I try to use the dataTripFunc, it is not showing tooltips, same function works for the other non-customized column, here is the code:
      <mx:DataGrid id="myDataGrid" dataProvider="{dataContent}" width="100%" height="100%">
      <mx:columns>
      <mx:DataGridColumn dataField="name" headerText=""/>
      <mx:DataGridColumn dataField="DateTime" headerText="DateTime" showDataTips="true" dataTipFunction="cellDataTipFunc"/>
      <mx:DataGridColumn dataField="ImgBar" headerText="ImgBar" itemRenderer="ImgBarCell" minWidth="40" showDataTips="true" dataTipFunction="cellDataTipFunc"/>
      </mx:columns>
      </mx:DataGrid>

      public function cellDataTipFunc(item:Object):String {
      return "hello world";
      }

      Where the itemRenderer -- "ImgBarCell" is a customized HBox component with a label and image on it.
      The tooltip -- "helloworld" shows up for column "DateTime", but not for customized ImgBar.
      Does this one have anything to do with event generation for customized itemRenderer? Or a bug in flex2?