0

I have a data grid and one of its columns has a long header text, so I want to span it across multiple lines. I tried several things but to no avail. Here's my current code:

<s:GridColumn rendererIsEditable="true" sortable="false">
                <s:headerRenderer>
                    <fx:Component>
                        <s:GridItemRenderer>
                            <s:layout><s:HorizontalLayout horizontalAlign="center"/></s:layout>
                            <s:Label fontWeight="bold" text="Allow Spillover" verticalAlign="middle" maxDisplayedLines="2"
                                toolTip="Allow campaign spillover if the impression goal was not reached by the defined end date. Enabled only if a Periodic or Total Impressions were defined in the ‘General Capping’ section. Maximum Spillover is until next configured flight date."/>
                        </s:GridItemRenderer>
                    </fx:Component>
                </s:headerRenderer>

As can be seen, I set maxDisplayedLines to 2, but the text still doesn't break, but spills outside of the column. What am I missing? Thanks.

zero323
  • 322,348
  • 103
  • 959
  • 935
user940016
  • 2,878
  • 7
  • 35
  • 56

1 Answers1

1

follow this link for answer

How to center a header renderer in a Spark data grid?

just change the maxDisplayedLines in Label of Header Renderer

Community
  • 1
  • 1
Asad
  • 1,817
  • 16
  • 23