1.基于mx:DataGridItemRenderer编写自定义组件:BoldFontRender.mxml文件 代码如下
<?xml version="1.0" encoding="utf-8"?>
<mx:DataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<fx:Script>
<![CDATA[
override public function set data(value:Object):void{
super.data=value;