Flex DataGrid HeaderRender 实例

	<mx:DataGridColumn id="column_1" width="{SMALL_COLUMN_WIDTH}" sortable="true" headerRenderer="com.DataGridHeader" 
							   headerText="No."  dataField="runnerNumber">
				<mx:itemRenderer>
					<fx:Component>
						<mx:Box	width="30" height="100%" verticalAlign="middle" verticalScrollPolicy="off" horizontalScrollPolicy="off" buttonMode="true" useHandCursor="true" mouseChildren="false">
							<mx:Label text="{data.runnerNumber}" width="100%"  height="15" textAlign="center"  buttonMode="true" useHandCursor="true" mouseChildren="false" />
						</mx:Box>
					</fx:Component>
				</mx:itemRenderer>
			</mx:DataGridColumn>
 
<?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
						  xmlns:s="library://ns.adobe.com/flex/spark"
						  xmlns:mx="library://ns.adobe.com/flex/mx"
						  focusEnabled="true"
						  autoDrawBackground="false"
						  >
	<s:Label id="lblData" buttonMode="true" useHandCursor="true"
			 text="{dataGridListData.label}"
			 top="0"
			 left="0"
			 right="0"
			 bottom="0"
			 paddingLeft="4"
			 paddingRight="4"
			 verticalAlign="middle"
			 />
</s:MXDataGridItemRenderer>

你可能感兴趣的:(datagrid)