# Creating Grid/GridRow/GridItem using Actionscript in Flex

**URL:** <https://forum.kirupa.com/t/creating-grid-gridrow-griditem-using-actionscript-in-flex/326130>\
**Category:** flash\
**Created:** [November 24, 2011, 10:15am UTC](https://forum.kirupa.com/t/creating-grid-gridrow-griditem-using-actionscript-in-flex/326130 "2011-11-24T10:15:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitinmukesh](https://avatars.discourse-cdn.com/v4/letter/n/7feea3/32.png) [@nitinmukesh](https://forum.kirupa.com/u/nitinmukesh)\
**Post date:** [November 24, 2011, 10:15am UTC](https://forum.kirupa.com/t/creating-grid-gridrow-griditem-using-actionscript-in-flex/326130/1 "2011-11-24T10:15:57Z")

</div>

Hi,

I am stuck with a problem and no idea on how to proceed on this.

I have created a Grid and want to draw border around it so its appearance is like table. The borders are just not appearing. Can someone provide any direction what I may be missing.

Here is the code

```php

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Style>
        Grid
        {
            horizontal-gap:-1;
            vertical-gap:-1;
            border-color:#000000;
            border-style:solid;
            border-thickness:5;
        }
        GridItem
        {
            border-color:#000000;
            border-style:solid;
            border-thickness:5;
        }
    </mx:Style>

    <mx:Grid x="31" y="24">
        <mx:GridRow>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="100" colSpan="2" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
        </mx:GridRow>
        
        <mx:GridRow>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="120" colSpan="2" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="100" colSpan="3" height="11">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
        </mx:GridRow>
        
        <mx:GridRow>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="100" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
            <mx:GridItem width="120" colSpan="3" height="30">
                <mx:Label text ="Nitin">
                    
                </mx:Label>
            </mx:GridItem>
        </mx:GridRow>
    </mx:Grid>
</mx:Application>

```
