How to change header font style in Spark DataGrid?

I'm looking since last week for a way how to change the font style of the header in a Spark DataGrid. It drive me nuts that I can't find a way to do this. Have anyone one an idea how to achieve it? Any help is appreciated.
Thanks,
- Artur

Hi,
Some styles won't work because some text styles got hardcoded into the DefaultGridHeaderRenderer's Label. You'll run into this issue not just with the DataGrid headers but also things like the Panel's title and other places where we have text. One way to get around this issue is to create your own custom headerRenderer based on the default one and then redefine the headerRenderer skin part in the skin.
First, create a subclass of the DefaultGridHeaderRenderer and tweak the "labelDisplay" to your liking (or even just take out all the styles and style it on your own as you had earlier using your custom header renderer's name). Example below (I named it "CustomHeaderRenderer"):
<?xml version="1.0" encoding="utf-8"?>
<skins:DefaultGridHeaderRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                 xmlns:s="library://ns.adobe.com/flex/spark"
                                 xmlns:mx="library://ns.adobe.com/flex/mx"
                                 xmlns:skins="spark.skins.spark.*"
                                 xmlns:comps="comps.*">
    <fx:Declarations>
        <!-- Remove fontweight="bold" and other styles as you wish
             Must be a component and not a factory. -->
        <s:Label id="labelDisplay"
                 verticalCenter="1" left="0" right="0" top="0" bottom="0"
                 textAlign="start"
                 verticalAlign="middle"
                 maxDisplayedLines="1"
                 showTruncationTip="true" />
    </fx:Declarations>
</skins:DefaultGridHeaderRenderer>
Next, create a simple DataGrid skin by creating a subclass of the  spark.skins.spark.DataGridSkin in MXML and defining a new headerRenderer  component in the fx:Declarations section. Example below (I named it "CustomDataGridSkin"):
<?xml version="1.0" encoding="utf-8"?>
<skins:DataGridSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx"
                xmlns:skins="spark.skins.spark.*"
                xmlns:comps="comps.*">
    <fx:Declarations>
        <!-- Must be a factory with the right id for the skin part -->
        <fx:Component id="headerRenderer">
            <comps:CustomHeaderRenderer />
        </fx:Component>
    </fx:Declarations>
</skins:DataGridSkin>
Last, assign your new skin as the skinClass of your DataGrid (either in MXML or as a style):
<s:DataGrid skinClass="comps.CustomDataGridSkin">
I know it's not pretty, but it's the result of trading off between having completely custom skinning vs. having knobs to tweak every style. Hope this helps.
-Kevin

Similar Messages

  • How to change the font style

    Hi All
    I am able to dispaly the content of a .txt file on the screen using inline frames(11g webcenter application using content repository- file system) . But 'm able to add styles to it like displaying it in bold letters. Any help on how to add templates
    Ex: Consider a file Sample.txt file contains the text – “Hello World. Welcome”
    • Display “Hello World” in bold and display “Welcome” underlined
    Link which i followed http://download.oracle.com/docs/cd/E12839_01/webcenter.1111/e10148/jpsdg_content.htm
    8.3.1 How to Add Content as an ADF Inline Frame
    code
    <af:inlineFrame id="inlineFrame1"
    source="/content/conn/Test/path/test1/Test.txt"
    inlineStyle="height:100px; color:Aqua;"
    styleClass="AFStretchWidth">
    </af:inlineFrame>
    Thanks,
    Tim.

    Hi Romeo,
    I got your point and class I require to apply is as below:
    .ms-contactcardtext3 {
        font-family:
    Arial !important;
        font-style: italic !important;
    Thank you for your trick :) 
    But its getting apply to title as well as to Department - as above class is same for both fields , while I require to change the style only for the department.
    Any suggestions ? I have changed the same using Designer which works as per the need , however - I dont want to use SPD Tool !!!
    Bottom line : I Require different font style in Title and Department without use of SPD.
    Any suggestions/idea ?
    Thanks and Regards,
    Dipti Chhatrapati

  • How to change the font style for user profile information in My Profile page?

    Hello,
    In my profile page, user information is getting display as below:
    Name
    Title
    Department --> Would you please let me know how can I change style for Department ( Information Technologies) Attribute in this section ?
    Thanks and Regards,
    Dipti Chhatrapati

    Hi Romeo,
    I got your point and class I require to apply is as below:
    .ms-contactcardtext3 {
        font-family:
    Arial !important;
        font-style: italic !important;
    Thank you for your trick :) 
    But its getting apply to title as well as to Department - as above class is same for both fields , while I require to change the style only for the department.
    Any suggestions ? I have changed the same using Designer which works as per the need , however - I dont want to use SPD Tool !!!
    Bottom line : I Require different font style in Title and Department without use of SPD.
    Any suggestions/idea ?
    Thanks and Regards,
    Dipti Chhatrapati

  • How to change the font style of user in webdynpro code

    Hi Experts
    I have retrieved the user in webdynpro code through ume api .
    But the username is getting displayed in bold by default.
    Could you suggest me how to convert it to normal font so that the username is not displayed in bold.
    Regards
    Chandana

    Hi,
    You haven't mentioned which UI elememt you are using to display the user name. For textView you can use the design property and set the value as standard.
    Regards
    Ayyapparaj

  • How to change the font size and style on run time

    dear all
    i try to change the font style and font size on runtime. I did the following:
    1- i created an item(:font_size) in which i will write the size of the font for the the other item ('customer_name')
    2 on the post_change trigger for 'font_size' i write this code
    SET_ITEM_PROPERTY('customer_name',FONT_size,(:font_size);
    i write 12 then then font size changed , then i write 18 , the size does not change. and when i write any value , no change happens. I do not know why
    the second problem is how to change the font style
    i made three checkbooks (bold,italic,underline)
    on the trugger when_checkbox_checked i write
         IF :BOLD = 'B' THEN
         SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'BOLD');
         ELSE
    SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'REGULAR');
         END IF;     
    no change happend at all.
    please help

    Hi friend,
    it's a really really strange tip... May be it's a Forms bug? I've tried with set_item_property..and.. you're right, it doesn't work..
    So.. you can try making this:
    - create a visual attribute with an specific font size....
    - use the
    SET_ITEM_INSTANCE_PROPERTY('block.item',CURRENT_RECORD,VISUAL_ATTRIBUTE,'you_visual_attribute');
    and call it from psot-change....
    It works
    Hope it helps,
    Jose.

  • How do I change the font style

    How do I change the font style?

    You almost certainly do not; Acrobat is not a word processor. Font styles, when they can be changed at all, are often a different font (bold, italic) or separate graphics (underline).
    Where do you want to change them? There are an amazing number of places in Acrobat to enter text.

  • How do I change the font style in After Effects CS6?

    How do I change the font style in After Effects CS6?

    AE basics: Go to  Window>Character or select Workspace>Text
    In the timeline, select the Text Layer or in the Comp Panel, with the text tool selected and the layer selected in the timeline, highlight the text you want to change
    In the Character Panel, Change the font attributes...
    Take a quick look at this short video. You will learn how to find the font panel, change the paragraph style and baseline shift:
    Please, since your question tells me you are very new to After Effects start here: Basic Workflow

  • How to change the font of the text in Control Editor??

    How to change the font of the text in Control Editor??

    Hi,
            you have to create a smartstyle and acces that in So10 transaction.in change mode,menu->FORMAT->CHANGE STYLE.
    here you will get all styles available.
    so first you have to create a style in SE72 and activate it. and then
    goto SO10-> change mode
    menu->FORMAT->CHANGE STYLE.
    now you will see the style you have created. select that.
    now you can see the format.
    <b>Reward points</b>
    Regards

  • How to change the font size of text and case in smartforms

    hi,
       could any one explain how to change the font size of text in smartforms. ex. previously i had taken P4 left aligned and C6 but now i want to decrease the font without making it bold. pl......... guide me
       secondly the value which are coming from tables are upper case but i need lower case. pl. guide
    thanking u

    check out the smart styles...create a font of ur size n use.
    Define the paragraphs & character formats using SMARTSTYLES & use them in your smartform.
    You have to give the smartstyle name in the Form attributes-->Output options for the formats to be used in your smartform.
    You can define font size in Smartform Style.
    Smartform Styles > Charcterformat> Font --> size.
    to load the font to SAP server chk this
    Re: Adding a new font for SAPscript/SMARTFORM output
    Regards
    Vasu

  • How to change the font size of text element in smartform

    Hi
    i want to know how to change the font size of text element in smartform
    regards
    Gincy

    Hi
    You can create Smartstyles, in which you can define paragraph formats for texts and character formats for character level changes.
    Paragraph format ---> alignment, font size etc
    character format for ---> superscript, subscript.
    After creating, in your smartform, there will be a option in the text element to enter a style.
    You give the created style and you can use the paragraph and character formats i that style.
    Hope this is clear..
    Regards
    Sekar

  • How to Change Report Font Size in 11i

    Hi,
    Please let me know how to change font size of an existing report in Quick steps.
    Basically the printed report font size is too small. We change the font size from the printer but still it dose not change.
    We have 11i on Unix Server and a dot matrix printer.
    The report is character based and Report Builder shows Courier 10, print style is Portrait. We need it to be 12-14.
    Thanks!

    Hi,
    Refer to the following document.
    Note: 467568.1 - How To Change The Font, Size, or Page Layout of Standard and FSG Reports
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=467568.1
    Regards,
    Hussein

  • How to change IR font size (only) dynamically

    Hi,
    On blog http://www.danielmcghan.us/2009/01/that-font-is-too-small.html, there was a nice example how to change IR font size on the fly.
    Some how seems that this is not working new Responsive 25 theme, which is not having "td" . So could anyone help me.
    I'd like to add some saving ability to some table (user preferences table) ... sou please expand that example if possible.
    For that I made it on Apex cloud demo: FONT_SIZE_ADJ_APP
    http://apex.oracle.com/pls/apex/f?p=2354
    Login data:
    UN : guest_admin
    PWD: Qwertz123!
    THX in advance for your help.
    Brg,
    Damir

    Th actual code from the working example looks different from the blogpost
    May be worth trying this code (in your page template)
    <td style="white-space:nowrap"><span id="decreaseFont">(-) </span><span id="saveFont">Save</span><span> / </span><span id="resetFont">Reset</span><span id="increaseFont"> (+)</span></td><u>For saving this into a custom user preferences table:</u>
    - you can amend the application process RETURN_NOTHING to insert/update using the item FONT_SIZE_ADJ
    And add computation to set the value into FONT_SIZE_ADJ from the user preferences table for the first time when users login

  • How to change header and footer in login page in oracle apps r12

    Hi all,
    how to change header and footer in login page in oracle apps r12 and login button background color, please help me
    thanks
    saran

    how to change header and footer in login page in oracle apps r12 and login button background color, please help meTips For Personalizing The E-Business Suite R12 Login Page (MainLoginPG) [ID 741459.1]
    How to Personalize Login page in R12? [ID 579917.1]
    R12 Login Page: How to Personalize the Logo ? [ID 849752.1]
    Thanks,
    Hussein

  • How to change default fonts in Keynote?

    How to change default fonts in Keynote?

    You can't set a default font.
    Instead use a custom slide master with the font you want to use.

  • How to change the font dynamically in SAP script

    Hello,
    There are three fields for a line item to be printed in SAP form (Through Script). The font of one field has to be bigger than rest of the two.
    Can anybody tell me how to change the font of a specific field in a line of an SAP-script?
    Regards
    Kiran

    Hi,
    Its like any other character format. you can have any field with a character format.
    --Ragu

Maybe you are looking for

  • Apple TV not in the list of devices: Win XP, Rendezvouz 1.0.6, iTunes 8.2.1

    I bought a new Apple TV yesterday I plugged it in and followed the instructions. It picked up an IP via DHCP from my router 192.168.0.102/24 My laptop is hosting my iTunes library, 192.168.0.101/24, no firewall. When prompted to connect to a computer

  • F110 - Vendor Bank Details

    Hello Team, I was just thinking if we are doing F110 where we need to pay directly from our bank account (house bank) to vendor bank account how it will work in SAP & what different config we need to do apart from the regular process. REgards, Sachin

  • HT204380 Why won't my FaceTime connect with others?

    Why won't my FaceTime connect with others?

  • Capacity decreased

    The capacity of my 1GB ipod shuffle second generation reduced to 967Mb after I changed my computer and restored the Ipod.Previously it showed 1Gb.does restoring or resetting to factory settings reduce capacity.I use windows xp.

  • Qmaster 3 and After Effects 8

    Does any one did a successful render with qmaster 3 and after effects 8. I mean I tried all the possible variation with generic render template but I get none and variation of none, like job is running forever but nothing is coming out of the render