# Display ComboBox In DataGrid

**URL:** <https://forum.kirupa.com/t/display-combobox-in-datagrid/281461>\
**Category:** flash\
**Created:** [February 9, 2009, 4:56pm UTC](https://forum.kirupa.com/t/display-combobox-in-datagrid/281461 "2009-02-09T16:56:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EssenceLord](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@EssenceLord](https://forum.kirupa.com/u/EssenceLord)\
**Post date:** [February 9, 2009, 4:56pm UTC](https://forum.kirupa.com/t/display-combobox-in-datagrid/281461/1 "2009-02-09T16:56:39Z")

</div>

I am using flash CS3, Actionscript 3. I am trying to display a combobox in the cells of a datagrid column via cellRenderer.

I’ve created a class file with my cellrenderer code. Here’s just a couple of my attempts:

This adds a movie clip (from the library) to the cellrenderer. The movie clip contains a combobox. Everything works, but I can’t click on the combobox to display the options.

```auto

package
{
    import fl.controls.listClasses.CellRenderer;
    import flash.utils.getDefinitionByName;
    import fl.controls.ComboBox;
    import flash.events.Event;
    
    public class myCellRenderer extends CellRenderer
    {
        public function myCellRenderer() 
        {
            super();
            
            
            // -------------- Create Combobox with School Names -----------------
            var instance = new (getDefinitionByName("MyMovieWithComboBox")); // Create Instance of this movieclip which contains a combobox
            this.addChild(instance); // Add this instance to the CellRenderer
        }
    }
}

```

In this attempt, I just dynamically create a combobox and add it to the cellRender. Nothing seems to work here. The combobox never appears.

```auto

package
{
    import fl.controls.listClasses.CellRenderer;
    import flash.utils.getDefinitionByName;
    import fl.controls.ComboBox;
    import flash.events.Event;
    
    public class myCellRenderer extends CellRenderer
    {
        public function myCellRenderer() 
        {
            super();
            
            
            // -------------- Create Combobox with School Names -----------------
            var myComboBox = new ComboBox();
            this.addChild(myComboBox );    
        }
    }
}

```

Thanks for any help.
