# DataGrid Image inserting Problem

**URL:** <https://forum.kirupa.com/t/datagrid-image-inserting-problem/280807>\
**Category:** flash\
**Created:** [February 1, 2009, 2:33pm UTC](https://forum.kirupa.com/t/datagrid-image-inserting-problem/280807 "2009-02-01T14:33:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shebimangalath](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@shebimangalath](https://forum.kirupa.com/u/shebimangalath)\
**Post date:** [February 1, 2009, 2:33pm UTC](https://forum.kirupa.com/t/datagrid-image-inserting-problem/280807/1 "2009-02-01T14:33:26Z")

</div>

**my flash code:**

```auto
 import fl.controls.*;
 
 var myData = new DataGrid
 myData.columns = ["Image", "Data"];
 myData.setStyle("cellRenderer", MultiLineHtmlCell);
 addChild(myData);
 myData.setSize(200, 400);
 
 for (var i=0; i<15; i++)
 {
  myData.addItem({Image: "<img src='letter.gif' width='14' height='13'/>", Data: "data"+i})
 }

```

**MultiLineHtmlCell.as :**

```auto
package 
{
 
 import fl.controls.listClasses.CellRenderer;
 import fl.controls.listClasses.ICellRenderer;
 
    public class MultiLineHtmlCell extends CellRenderer {
       
    public function MultiLineHtmlCell() {
    super();
   textField.wordWrap = true;
   textField.autoSize = "left";
   textField.selectable = false;
   textField.background = false;
   textField.border = false;
        }
  
  public static function getStyleDefinition():Object {
            return CellRenderer.getStyleDefinition();
        }
        
        override protected function drawLayout():void {
            textField.width = this.width;
            textField.htmlText = textField.text;
            super.drawLayout();
        }
    }

```

}

Here iam inserting an image at first column of the dataGrid…

when i mouse over or click the datagrid item, the image will disappear for a short period of time…

Could u plz give me a solution for this…

thnks n advnc  
Shabeer…
