Products
Technologies

Developer resources

Removing the header separator on the DataGrid control in Flex

Not yet rated.

Problem

The following example shows how you can remove the header separator skin on the Flex DataGrid control.

Solution

Set the headerSeparatorSkin style to remove the vertical header separator skin on the Flex DataGrid control.

Detailed explanation

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/03/20/removing-the-header-separator-on-the-datagrid-control-in-flex/ -->
<mx:Application name="DataGrid_headerSeparatorSkin_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        backgroundColor="white">

    <mx:DataGrid id="dataGrid"
            headerSeparatorSkin="mx.skins.ProgrammaticSkin">
        <mx:dataProvider>
            <mx:ArrayCollection>
                <mx:Object c1="1. One" c2="1. Two" c3="1. Three" />
                <mx:Object c1="2. One" c2="2. Two" c3="2. Three" />
                <mx:Object c1="3. One" c2="3. Two" c3="3. Three" />
                <mx:Object c1="4. One" c2="4. Two" c3="4. Three" />
                <mx:Object c1="5. One" c2="5. Two" c3="5. Three" />
                <mx:Object c1="6. One" c2="6. Two" c3="6. Three" />
            </mx:ArrayCollection>
        </mx:dataProvider>
    </mx:DataGrid>

</mx:Application>

For more information, see "Removing the header separator on the DataGrid control in Flex" on FlexExamples.com.

Report abuse

Related recipes