<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; verticalGridLines</title>
	<atom:link href="http://blog.flexexamples.com/tag/verticalgridlines/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changing the appearance of the locked column separator skin for a DataGrid control in Flex 3</title>
		<link>http://blog.flexexamples.com/2007/12/05/changing-the-appearance-of-the-locked-column-separator-skin-for-a-datagrid-control-in-flex-3/</link>
		<comments>http://blog.flexexamples.com/2007/12/05/changing-the-appearance-of-the-locked-column-separator-skin-for-a-datagrid-control-in-flex-3/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 07:19:46 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[lockedColumnCount]]></category>
		<category><![CDATA[verticalGridLines]]></category>
		<category><![CDATA[verticalLockedSeparatorSkin]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/05/changing-the-appearance-of-the-locked-column-separator-skin-for-a-datagrid-control-in-flex-3/</guid>
		<description><![CDATA[<p>The following example shows how you can set the verticalLockedSeparatorSkin style in MXML and ActionScript to control the appearance of the vertical locked separator skin when setting the lockedColumnCount property on a Flex Datagrid control.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DataGrid_verticalLockedSeparatorSkin_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/12/05/changing-the-appearance-of-the-locked-column-separator-skin-for-a-datagrid-control-in-flex-3/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the <code>verticalLockedSeparatorSkin</code> style in MXML and ActionScript to control the appearance of the vertical locked separator skin when setting the <code>lockedColumnCount</code> property on a Flex Datagrid control.</p>
<p>Full code after the jump.</p>
<p><span id="more-352"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DataGrid_verticalLockedSeparatorSkin_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/12/05/changing-the-appearance-of-the-locked-column-separator-skin-for-a-datagrid-control-in-flex-3/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ItemClickEvent;

            [Bindable]
            [Embed(source="assets.swf#BlankBar")]
            private var blankBar:Class;

            [Bindable]
            [Embed(source="assets.swf#RedVBar")]
            private var redVBar:Class;

            [Bindable]
            [Embed(source="assets.swf#GreyVBar")]
            private var greyVBar:Class;

            private function setVLockedSeparatorSkin(skin:Class):void {
                dataGrid.setStyle("verticalLockedSeparatorSkin", skin);
            }

            private function toggleButtonBar_itemClick(evt:ItemClickEvent):void {
                setVLockedSeparatorSkin(evt.item.data);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object c1="1a" c2="1b" c3="1c" c4="1d" c5="1e" /&gt;
                &lt;mx:Object c1="2a" c2="2b" c3="2c" c4="2d" c5="2e" /&gt;
                &lt;mx:Object c1="3a" c2="3b" c3="3c" c4="3d" c5="3e" /&gt;
                &lt;mx:Object c1="4a" c2="4b" c3="4c" c4="4d" c5="4e" /&gt;
                &lt;mx:Object c1="5a" c2="5b" c3="5c" c4="5d" c5="5e" /&gt;
                &lt;mx:Object c1="6a" c2="6b" c3="6c" c4="6d" c5="6e" /&gt;
                &lt;mx:Object c1="7a" c2="7b" c3="7c" c4="7d" c5="7e" /&gt;
                &lt;mx:Object c1="8a" c2="8b" c3="8c" c4="8d" c5="8e" /&gt;
                &lt;mx:Object c1="9a" c2="9b" c3="9c" c4="9d" c5="9e" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="undefined (default)" data="{undefined}" /&gt;
        &lt;mx:Object label="red (0xFF0000)" data="{redVBar}" /&gt;
        &lt;mx:Object label="grey (0xCCCCCC)" data="{greyVBar}" /&gt;
        &lt;mx:Object label="blank" data="{blankBar}" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:ToggleButtonBar id="toggleButtonBar"
                dataProvider="{arr}"
                selectedIndex="1"
                itemClick="toggleButtonBar_itemClick(event);" /&gt;

        &lt;mx:Spacer width="100%" /&gt;

        &lt;mx:CheckBox id="checkBox"
                label="verticalGridLines:"
                labelPlacement="left"
                selected="true" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:DataGrid id="dataGrid"
            dataProvider="{arrColl}"
            horizontalScrollPolicy="on"
            verticalScrollPolicy="on"
            verticalGridLines="{checkBox.selected}"
            verticalLockedSeparatorSkin="{redVBar}"
            width="320"
            rowCount="6"
            lockedColumnCount="1"&gt;
        &lt;mx:columns&gt;
            &lt;mx:DataGridColumn dataField="c1" /&gt;
            &lt;mx:DataGridColumn dataField="c2" /&gt;
            &lt;mx:DataGridColumn dataField="c3" /&gt;
            &lt;mx:DataGridColumn dataField="c4" /&gt;
            &lt;mx:DataGridColumn dataField="c5" /&gt;
        &lt;/mx:columns&gt;
    &lt;/mx:DataGrid&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/DataGrid_verticalLockedSeparatorSkin_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/DataGrid_verticalLockedSeparatorSkin_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing the appearance of the locked column separator skin for a DataGrid control in Flex 3 on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/12/05/changing-the-appearance-of-the-locked-column-separator-skin-for-a-datagrid-control-in-flex-3/',contentID: 'post-352',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'lockedColumnCount,verticalGridLines,verticalLockedSeparatorSkin',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/12/05/changing-the-appearance-of-the-locked-column-separator-skin-for-a-datagrid-control-in-flex-3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Styling the Flex DataGrid control using a custom separator skins</title>
		<link>http://blog.flexexamples.com/2007/08/28/styling-the-flex-datagrid-control-using-a-custom-separator-skins/</link>
		<comments>http://blog.flexexamples.com/2007/08/28/styling-the-flex-datagrid-control-using-a-custom-separator-skins/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 20:23:48 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[headerSeparatorSkin]]></category>
		<category><![CDATA[horizontalGridLines]]></category>
		<category><![CDATA[horizontalSeparatorSkin]]></category>
		<category><![CDATA[verticalGridLines]]></category>
		<category><![CDATA[verticalSeparatorSkin]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/28/styling-the-flex-datagrid-control-using-a-custom-separator-skins/</guid>
		<description><![CDATA[<p>The following example demonstrates how you can customize the Flex 3 DataGrid control by specifying a custom skin for the horizontalSeparatorSkin and verticalSeparatorSkin styles.</p> <p class="alert">These styles were added in Flex 3 and will not work with Flex 2.0.1.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DataGrid_verticalSeparatorSkin_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/08/28/styling-the-flex-datagrid-control-using-a-custom-separator-skins/ --&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example demonstrates how you can customize the Flex 3 DataGrid control by specifying a custom skin for the <code>horizontalSeparatorSkin</code> and <code>verticalSeparatorSkin</code> styles.</p>
<p class="alert">These styles were added in Flex 3 and will not work with Flex 2.0.1.</p>
<p>Full code after the jump.</p>
<p><span id="more-141"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DataGrid_verticalSeparatorSkin_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/08/28/styling-the-flex-datagrid-control-using-a-custom-separator-skins/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            [Bindable]
            [Embed(source="./assets/redbluebar.gif")]
            private var RedBlueBar:Class;

            [Bindable]
            [Embed(source="./assets/greencircle.png")]
            private var GreenCircle:Class;
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Style&gt;
        .centered {
            fontWeight: bold;
            textAlign: center;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object country="USA"
                gold="35"
                silver="39"
                bronze="29" /&gt;
        &lt;mx:Object country="China"
                gold="32"
                silver="17"
                bronze="14" /&gt;
        &lt;mx:Object country="Russia"
                gold="27"
                silver="27"
                bronze="38" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:CheckBox id="hGridLines"
                label="horizontalGridLines"
                selected="true" /&gt;

        &lt;mx:Spacer width="50" /&gt;

        &lt;mx:CheckBox id="vGridLines"
                label="verticalGridLines"
                selected="true" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:DataGrid id="dataGrid"
            dataProvider="{arr}"
            headerStyleName="centered"
            headerSeparatorSkin="{GreenCircle}"
            horizontalSeparatorSkin="{RedBlueBar}"
            horizontalGridLines="{hGridLines.selected}"
            verticalSeparatorSkin="{RedBlueBar}"
            verticalGridLines="{vGridLines.selected}"&gt;
        &lt;mx:columns&gt;
            &lt;mx:DataGridColumn dataField="country"
                    headerText="Country:"
                    textAlign="left" /&gt;
            &lt;mx:DataGridColumn dataField="gold"
                    headerText="Gold:"
                    textAlign="right" /&gt;
            &lt;mx:DataGridColumn dataField="silver"
                    headerText="Silver:"
                    textAlign="right" /&gt;
            &lt;mx:DataGridColumn dataField="bronze"
                    headerText="Bronze:"
                    textAlign="right" /&gt;
        &lt;/mx:columns&gt;
    &lt;/mx:DataGrid&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/DataGrid_verticalSeparatorSkin_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/DataGrid_verticalSeparatorSkin_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>The &#8220;redbluebar.gif&#8221; asset in the above example is a simple 10 pixel wide by 2 pixel high GIF which gets stretched horizontally to fit the width of the data grid (when used as a horizontal separator skin). The same asset was used as a vertical separator skin in which case it gets stretched vertically to match the data grid&#8217;s height). It is very important to note that the skin asset is stretched and not tiled/repeated. Secondly, the &#8220;greencircle.png&#8221; asset in the above example is a 10 pixel by 10 pixel green circle with a transparent background. It also gets stretched vertically to match the current height of the data grid&#8217;s header (as specified by the <code>headerHeight</code> property).</p>
<p>Not the prettiest of samples, I know. But you can view the full source code by right-clicking in the SWF above and downloading all the code/assets.</p>
<p class="note">If all you want to do is change the color of the DataGrid control&#8217;s horizontal and vertical lines, you can use the <code>horizontalGridLineColor</code> and <code>verticalGridLineColor</code> styles, which also work in Flex 2.0.1. For more information, see <a href="http://blog.flexexamples.com/2007/07/23/toggling-a-datagrid-controls-horizontal-grid-lines-and-vertical-grid-lines/">&#8220;Toggling a DataGrid control’s horizontal grid lines and vertical grid lines&#8221;</a>.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Styling the Flex DataGrid control using a custom separator skins on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/08/28/styling-the-flex-datagrid-control-using-a-custom-separator-skins/',contentID: 'post-141',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'headerSeparatorSkin,horizontalGridLines,horizontalSeparatorSkin,verticalGridLines,verticalSeparatorSkin',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/08/28/styling-the-flex-datagrid-control-using-a-custom-separator-skins/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Toggling a DataGrid control&#8217;s horizontal grid lines and vertical grid lines</title>
		<link>http://blog.flexexamples.com/2007/07/23/toggling-a-datagrid-controls-horizontal-grid-lines-and-vertical-grid-lines/</link>
		<comments>http://blog.flexexamples.com/2007/07/23/toggling-a-datagrid-controls-horizontal-grid-lines-and-vertical-grid-lines/#comments</comments>
		<pubDate>Tue, 24 Jul 2007 05:42:05 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[alternatingItemColors]]></category>
		<category><![CDATA[horizontalGridLines]]></category>
		<category><![CDATA[verticalGridLines]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/07/23/toggling-a-datagrid-controls-horizontal-grid-lines-and-vertical-grid-lines/</guid>
		<description><![CDATA[<p>OK, this is a pretty neat trick. Flex makes it pretty easy to customize the look and feel of the DataGrid. For example, the following code lets you toggle the data grid&#8217;s horizontalGridLines and verticalGridLines styles on or off, change the alternating row background colors so each row is a plain white, and sets the [...]]]></description>
			<content:encoded><![CDATA[<p>OK, this is a pretty neat trick. Flex makes it pretty easy to customize the look and feel of the DataGrid. For example, the following code lets you toggle the data grid&#8217;s <code>horizontalGridLines</code> and <code>verticalGridLines</code> styles on or off, change the alternating row background colors so each row is a plain white, and sets the <code>horizontalGridLineColor</code> and <code>verticalGridLineColor</code> styles to red.</p>
<p>Full code after the jump.</p>
<p><span id="more-23"></span></p>
<p>The following example sets the horizontal and vertical grid lines to red, disables the <code>alternatingItemColors</code> style by setting it to white, and controls the <code>horizontalGridLines</code> and <code>verticalGridLines</code> styles by using two CheckBox controls:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DataGrid_gridLines_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/07/23/toggling-a-datagrid-controls-horizontal-grid-lines-and-vertical-grid-lines/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="item 1" data="1" /&gt;
        &lt;mx:Object label="item 2" data="2" /&gt;
        &lt;mx:Object label="item 3" data="3" /&gt;
        &lt;mx:Object label="item 4" data="4" /&gt;
        &lt;mx:Object label="item 5" data="5" /&gt;
        &lt;mx:Object label="item 6" data="6" /&gt;
        &lt;mx:Object label="item 7" data="7" /&gt;
        &lt;mx:Object label="item 8" data="8" /&gt;
        &lt;mx:Object label="item 9" data="9" /&gt;
        &lt;mx:Object label="item 0" data="0" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ArrayCollection id="arrColl" source="{arr}" /&gt;

    &lt;mx:DataGrid id="dataGrid"
            dataProvider="{arrColl}"
            alternatingItemColors="[white]"
            rowCount="6"
            horizontalGridLines="{hGL.selected}"
            verticalGridLines="{vGL.selected}"
            horizontalGridLineColor="red"
            verticalGridLineColor="red"&gt;
        &lt;mx:columns&gt;
            &lt;mx:DataGridColumn id="labelCol" dataField="label" /&gt;
            &lt;mx:DataGridColumn id="dataCol" dataField="data" /&gt;
        &lt;/mx:columns&gt;
    &lt;/mx:DataGrid&gt;

    &lt;mx:CheckBox id="hGL" label="horizontalGridLines" selected="true" /&gt;
    &lt;mx:CheckBox id="vGL" label="verticalGridLines" selected="true" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information">View source is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/DataGrid_gridLines_test/bin/main.html" width="100%" height="250"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Toggling a DataGrid control\&#039;s horizontal grid lines and vertical grid lines on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/07/23/toggling-a-datagrid-controls-horizontal-grid-lines-and-vertical-grid-lines/',contentID: 'post-23',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'alternatingItemColors,horizontalGridLines,verticalGridLines',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/07/23/toggling-a-datagrid-controls-horizontal-grid-lines-and-vertical-grid-lines/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

