开发者

How to turn off grid lines in Flex Spark DataGrid

Just as the title says, how can I turn off horizontal and vertical gri开发者_运维问答d lines in a Flex Spark DataGrid?


Create a new skin based on the spark datagrid skin, if you are using Flash builder this can be done easily with New > MXML Skin, if you are not, you can find the file DataGridSkin.mxml under sdks\4.5.1\frameworks\projects\spark\src\spark\skins\spark

Make a copy of this skin, in order to make the horizontal and vertical grid lines disappear, you have to delete these components

<fx:Component id="columnSeparator">
    <s:Line>
        <s:stroke>
            <s:SolidColorStroke color="0xE6E6E6" weight="1" caps="square"/>
        </s:stroke>
    </s:Line>
</fx:Component>

and

<fx:Component id="rowSeparator">
        <s:Line>
            <s:stroke>
                <s:SolidColorStroke color="0xE6E6E6" weight="1" caps="square"/>
            </s:stroke>
        </s:Line>
 </fx:Component>

After that, don't forget to set your datagrid skin to this skin

skinClass="path.to.skin.CustomSkin"


Create a new skin based on the original one and edit it to your liking.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜