Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-26-2010, 09:35 PM   #1
budkin
Registered User
 
Join Date: Nov 2009
Location: Austin, TX
Posts: 13
Question Can't change AdvancedDataGrid Header Color

Hello Flexxers,

I'm having a really annoying problem styling the AdvancedDataGrid header text colors. With a regular DataGrid you can use a property called "headerStyleName" to set the color of the header text. According to the documentation this style is applicable to AdvancedDataGrid as well. The problem is that it won't apply the style no matter what I do.

This is driving me nuts as I have to use Advanced data grids because of their added functionality. If anyone can help me with this issue it would be much appreciated. I was going to post sample application code so you could see the issue but I don't have enough posts here for links.
budkin is offline   Reply With Quote
Old 09-02-2010, 10:00 PM   #2
budkin
Registered User
 
Join Date: Nov 2009
Location: Austin, TX
Posts: 13
Default

Anyone have any ideas on this? I still can't figure out how to change the dang color of the header text.
budkin is offline   Reply With Quote
Old 09-02-2010, 11:16 PM   #3
budkin
Registered User
 
Join Date: Nov 2009
Location: Austin, TX
Posts: 13
Default

I got the answer on the Adobe Forums if anyone else is having this problem. Just add this style to your inline styles or your css file:

mx|AdvancedDataGridHeaderRenderer
{
color: #FF0000;
fontWeight: bold;
}
budkin is offline   Reply With Quote
Old 02-07-2011, 03:26 AM   #4
savioseb
Registered User
 
Join Date: Feb 2011
Posts: 1
Default

Thanks a lot! this helped me big time!

Anyway we can remove the line next to the sorting option. I have disabled sort, but the vertical line still appears.
savioseb is offline   Reply With Quote
Old 02-13-2011, 03:51 AM   #5
Sly_cardinal
Senior Member
 
Join Date: Mar 2004
Location: Australia
Posts: 318
Default

Quote:
Originally Posted by savioseb View Post
Thanks a lot! this helped me big time!

Anyway we can remove the line next to the sorting option. I have disabled sort, but the vertical line still appears.
I'm using Flex 3.5 but point you in the right direction for a Flex 4 solution.
You just need to set the 'header-sort-separator-skin' to a skin that won't draw anything for the separators. I've used the ProgrammaticSkin:

MXML:
HTML Code:
<mx:AdvancedDataGrid id="grid"
    styleName="dataGrid">
    ...
</mx:AdvancedDataGrid>
CSS:
ActionScript Code:
.dataGrid {     header-separator-skin: ClassReference("mx.skins.ProgrammaticSkin");     header-sort-separator-skin: ClassReference("mx.skins.ProgrammaticSkin"); }
Sly_cardinal is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:03 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.