actionscript-3apache-flexflex4.5flex-sparkadvanceddatagrid

last column of spark datagrid is not resizing


i have used spark datagrid for my mobile application . my problem is last column of my spark datagrid is not resizing to the grid's width. for example, my spark datagrid's width is 500,and i have 4 columns of width size 100 each. four columns are places as per their size in the datagrid. but the last 100 pixels in datagrid looks like empty space.In advanced datagrid and mx datagrid , the columns are automatically resized to the grid's width.

please help me to achieve this, in the spark datagrid.

thanks vengatesh


Solution

  • This is sprk DataGrid issue. To avoid it you need to listen event "resize" from DataGrid and in handler set last column's width to NaN.

    
        protected function dataGridResizeHandler(event:ResizeEvent):void
        {
            lastColumn.width = NaN;
        }
    
    

    That works for me.