<?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例子 &#187; DataGrid</title>
	<atom:link href="http://blog.minidx.com/tag/datagrid/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.minidx.com</link>
	<description>中文Adobe Flex例子,Flex实例教程,RIA资源,全文检索技术,算法和数据结构</description>
	<lastBuildDate>Thu, 31 Mar 2011 03:22:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flex中让DataGrid像AdvancedDataGrid那样支持多列排序</title>
		<link>http://blog.minidx.com/2009/12/03/3070.html</link>
		<comments>http://blog.minidx.com/2009/12/03/3070.html#comments</comments>
		<pubDate>Thu, 03 Dec 2009 12:47:40 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[Adobe其他]]></category>
		<category><![CDATA[AdvancedDataGrid]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[排序]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/2009/12/03/3070.html</guid>
		<description><![CDATA[Flex中的AdvancedDataGrid是支持多列同时排序的，而DataGrid则只允许单列排序。有些特殊情况可能有让DataGrid像AdvancedDataGrid那样支持多列排序的需求，是否可以实现呢？
其实只要屏蔽掉DataGrid头部相关事件，并且调用我们自己的排序函数就可以实现这一功能了。








http://cookbooks.adobe.com/post_Multiple_column_sorting_with_a_DataGrid-16564.html
详细的介绍了如何屏蔽相关事件，如何自定义排序函数，如何添加监听函数等的逐步实现。刚好有这样需求的朋友们可以参考一下。
你可能还对下列文章感兴趣:Flex中通过DataGrid类的sortableColumns属性和DataGridColumn类的sortable属性控制DataGrid控件是否可排序的例子Flex中如何创建自定义排序DataGrid控件的例子Flex中如何重新设置DataGrid控件的排序的例子Flex中如何通过ArrayCollection对象的collectionChange事件，verticalScrollPosition以及maxVerticalScrollPosition属性创建一个自动滚动的DataGrid的例子Flex中如何通过headerStyleName和color样式设置DataGrid头部列文本颜色的例子]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/12/03/3070.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex中如何通过ArrayCollection对象的collectionChange事件，verticalScrollPosition以及maxVerticalScrollPosition属性创建一个自动滚动的DataGrid的例子</title>
		<link>http://blog.minidx.com/2009/07/01/2673.html</link>
		<comments>http://blog.minidx.com/2009/07/01/2673.html#comments</comments>
		<pubDate>Wed, 01 Jul 2009 00:21:14 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[ArrayCollection]]></category>
		<category><![CDATA[collectionChange]]></category>
		<category><![CDATA[CollectionEvent]]></category>
		<category><![CDATA[maxVerticalScrollPosition]]></category>
		<category><![CDATA[validateNow()]]></category>
		<category><![CDATA[verticalScrollPosition]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=2673</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过ArrayCollection对象的collectionChange事件，verticalScrollPosition以及maxVerticalScrollPosition属性创建一个自动滚动的DataGrid。
让我们先来看一下Demo（可以点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;name=&#34;DataGrid_maxVerticalScrollPosition_text&#34;
&#160; &#160; &#160; &#160; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;
&#160; &#160; &#160; &#160; creationComplete=&#34;init();&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Script&#62;
&#160; &#160; &#160; &#160; &#60;![CDATA[
&#160; &#160; &#160; &#160; &#160; &#160; import mx.events.CollectionEvent;
&#160; &#160; &#160; &#160; &#160; &#160; private var timer:Timer;
&#160;
&#160; &#160; &#160; &#160; &#160; &#160; private function init():void {
&#160; &#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/07/01/2673.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex中如何通过headerStyleName和color样式设置DataGrid头部列文本颜色的例子</title>
		<link>http://blog.minidx.com/2009/06/26/2651.html</link>
		<comments>http://blog.minidx.com/2009/06/26/2651.html#comments</comments>
		<pubDate>Fri, 26 Jun 2009 14:08:42 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[headerStyleName]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=2651</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过headerStyleName和color样式，设置DataGrid头部列文本颜色。
让我们先来看一下Demo（可以点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;name=&#34;DataGrid_headerStyleName_color_test&#34;
&#160; &#160; &#160; &#160; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Style&#62;
&#160; &#160; &#160; &#160; .myHeaderStyles {
&#160; &#160; &#160; &#160; &#160; &#160; color: red;
&#160; &#160; &#160; &#160; &#160; &#160; fontWeight: bold;
&#160; &#160; &#160; &#160; }
&#160; &#160; &#60;/mx:Style&#62;
&#160;
&#160; &#160; &#60;mx:Array&#160;id=&#34;arrDP&#34;&#62;
&#160; &#160; &#160; &#160; &#60;mx:Object&#160;c=&#34;1&#34; c1=&#34;One&#34; c2=&#34;Two&#34; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/06/26/2651.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex中如何通过headerColors样式设置DataGrid头部颜色的例子</title>
		<link>http://blog.minidx.com/2009/06/25/2649.html</link>
		<comments>http://blog.minidx.com/2009/06/25/2649.html#comments</comments>
		<pubDate>Thu, 25 Jun 2009 14:07:57 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[headerColors]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=2649</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过headerColors样式，设置DataGrid头部颜色。
让我们先来看一下Demo（可以点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;name=&#34;DataGrid_headerColors_test&#34;
&#160; &#160; &#160; &#160; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Array&#160;id=&#34;arr&#34;&#62;
&#160; &#160; &#160; &#160; &#60;mx:Object&#160;c1=&#34;1. One&#34; c2=&#34;1. Two&#34; c3=&#34;1. Three&#34; /&#62;
&#160; &#160; &#160; &#160; &#60;mx:Object&#160;c1=&#34;2. One&#34; c2=&#34;2. Two&#34; c3=&#34;2. Three&#34; /&#62;
&#160; &#160; &#160; &#160; &#60;mx:Object&#160;c1=&#34;3. One&#34; c2=&#34;3. Two&#34; c3=&#34;3. Three&#34; /&#62;
&#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/06/25/2649.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex中如何通过监听collectionChange事件检测DataGrid的数据源是否改变的例子</title>
		<link>http://blog.minidx.com/2009/06/06/2575.html</link>
		<comments>http://blog.minidx.com/2009/06/06/2575.html#comments</comments>
		<pubDate>Sat, 06 Jun 2009 10:29:38 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[collectionChange]]></category>
		<category><![CDATA[dataProvider]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/?p=2575</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过监听collectionChange事件，检测DataGrid的数据源是否改变。
让我们先来看一下Demo（可以右键View Source或点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;name=&#34;DataGrid_collectionChange_test&#34;
&#160; &#160; &#160; &#160; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;
&#160; &#160; &#160; &#160; initialize=&#34;init();&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Script&#62;
&#160; &#160; &#160; &#160; &#60;![CDATA[
&#160; &#160; &#160; &#160; &#160; &#160; import mx.controls.Alert;
&#160; &#160; &#160; &#160; &#160; &#160; import mx.events.CollectionEvent;
&#160;
&#160; &#160; &#160; &#160; &#160; &#160; private function init():void {
&#160; &#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2009/06/06/2575.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching using disk
Object Caching 412/793 objects using disk

Served from: blog.minidx.com @ 2012-02-09 19:05:00 -->
