下面是main.mxml:
- <? xml version = " 1.0 " encoding = " utf-8 " ?>
- < 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 >
本文展示了如何使用 Flex 和 MXML 创建一个 DataGrid 示例,该 DataGrid 使用了自定义的头部分隔样式。示例中包含了五个数据项,每个数据项有三个属性 c1、c2 和 c3,通过 ArrayCollection 进行数据绑定。

被折叠的 条评论
为什么被折叠?



