2 Replies Latest reply on Nov 10, 2006 6:31 AM by JasonBrownAA

    DataGridItemRenderer doesn't support toolTips?

    JasonBrownAA
      It looks like DataGridItemRenderer doesn't support toolTips, despite the claims in the API. It compiles just fine, but they don't display. Changing my code to use mx:Label as my renderer works just fine, without further code change. Is this a known issue?
        • 1. Re: DataGridItemRenderer doesn't support toolTips?
          peterent Level 2
          The DataGridColumn doesn't display toolTips, it displays dataTips. The idea is that the tip is another field, perhaps one not visible, from your data:

          {maker:"Toyota", model:"RAV4",year:2007,options:"Leather\nSun roof\nCargo Mat"}

          <mx:DataGridColumn dataField="model", dataTipField="options" />

          then also set showDataTips="true" on the DataGrid itself.
          • 2. Re: DataGridItemRenderer doesn't support toolTips?
            JasonBrownAA Level 1
            but it does display them properly if you have a custom itemRenderer for a DataGridColumn, and coded as such:

            <mx:Label xmlns:mx=" http://www.adobe.com/2006/mxml" dataChange="start()">

            <mx:Script>
            <![CDATA[
            import mx.controls.DataGrid;

            import mx.controls.dataGridClasses.DataGridListData;
            import flash.events.Event;

            public function start():void {
            addEventListener("dataChange", handleDataChanged);
            }

            public function handleDataChanged(event:Event):void {
            // Cast listData to DataGridListData.
            var myListData:DataGridListData = DataGridListData(listData);

            this.toolTip=myListData.label;

            }
            ]]>
            </mx:Script>
            </mx:Label>

            changing mx:Label to mx:DataGridItemRenderer compiles just fine, but the toolTip is never displayed.