 import mx.collections.IList;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
+import mx.events.PropertyChangeEvent;
 
 [ExcludeClass]
 

                
            case CollectionEventKind.UPDATE:
            {
                // handled by GridLayout
                break;
            }
            

                clearColumns(event.location, event.items.length);
                break;
            }
        }
    }
    
    /**
     *  @private
     *  Handle CollectionEventKind.UPDATE for a column whose 'visibility' 
     *  property changed.
     */
    private function columns_visibleChangedHandler(pcEvent:PropertyChangeEvent):void
    {
        const column:GridColumn = pcEvent.source as GridColumn;
        const columnIndex:int = column.columnIndex;
        if (!column || columnIndex == -1)
            return;
        
        clearColumns(columnIndex, 1);
        
        // column.visible==true columns need to have their typical sizes and 
        // actual column width updated, while column.visible==false column
        // have their typical sizes updated to 0 and actual column width
        // set to NaN.
        if (column.visible)
        {
            setTypicalCellWidth(columnIndex, NaN);
            setTypicalCellHeight(columnIndex, NaN);
            if (!isNaN(column.width))
                setColumnWidth(columnIndex, column.width);
        }
        else
        {
            setTypicalCellWidth(columnIndex, 0);
            setTypicalCellHeight(columnIndex, 0);
            setColumnWidth(columnIndex, NaN);
        }
    }
    
