Select to view content in your preferred language

Datagrid Column Heading Text

1152
2
11-19-2010 09:53 AM
JeffPerkins
Occasional Contributor
Seem like a basic question, but..

I'm trying to bold the header text of my datagrid column name without bolding the dataproviders results.  Using the fontweight renders such. 

This was a default "action" in Flex 3x.   Here's my example www.texasbeachwatch.com.  Notice how the header text of the DG column name (Beach Stations and Level) are in bold text.

Now in FlashBuilder 4, they are not. example http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=QueryTaskNoMap 

I realize the <mx:DataGrid> was one of the component that was not updated to the spark component in Flex/FlashB4, but has anyone else dealt with this?
Tags (2)
0 Kudos
2 Replies
Drew
by
Frequent Contributor
Use the headerStyleName property on the DataGrid to style your header.

sample

 <fx:Style>
  @namespace s "library://ns.adobe.com/flex/spark";
  @namespace mx "library://ns.adobe.com/flex/mx";
  @namespace esri "http://www.esri.com/2008/ags";
  
  .headerStyle
  {
   font-weight:bold;
  }
  
 </fx:Style>

 <mx:DataGrid headerStyleName="headerStyle" id="resultsGrid" width="100%" height="100%">
</mx:DataGrid>


Drew
0 Kudos
JeffPerkins
Occasional Contributor
Yes! 

Thanks!
0 Kudos