Question

For the life of me, I can't get stylesheets to work... Something having to do with the namespaces and the way I am setting them. So here is my code:

<mx:Style>
  @namespace mx "library://ns.adobe.com/flex/halo";
  mx|DataGrid {
   headerColors: #0066cc, #00ffff;
   borderThickness: 7;
   borderColor: #00ff33;
  }
 </mx:Style>

<mx:DataGrid 
  styleName="myGridStyle"
  wordWrap="true"  
  id="people" 
  width="500" 
  height="350" 
  dataProvider="{dataArr}" 
  editable = "false" 
  itemClick="itemClickEvent(event);" sortableColumns="true"  
  rollOverColor="0xffffff"
  >

What am I doing wrong here? I've tried it many different ways and it seems to work for others in tutorials I have done.

Was it helpful?

Solution

The namespace has recently changed from:

@namespace mx "library://ns.adobe.com/flex/halo";

to

@namespace mx "library://ns.adobe.com/flex/mx";

mx instead of halo.

Let me know if that fixes it.

Lance

OTHER TIPS

try to remove "styleName="myGridStyle"" in your datagrid declaration

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top