Wrap Header text in Datagrid (Flex 1.5)

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Wrap Header text in Datagrid (Flex 1.5)

    How do I wrap header text in a datagrid in Flex 1.5??
    joshuadsilva Guest

  2. Similar Questions and Discussions

    1. Text wrap adding a ghost Wrap???
      hello, I was working on creating a clipping mask on a photo by using the pen tool and making a silo. Then I would cut the picture and paste into...
    2. Datagrid Header Disappearing Text
      When my stand alone flash app is being resized, the two datagrids' header texts disappears and reappears. I've changed fonts, embedded fonts,...
    3. Different header and text alignment in winform datagrid ??
      How can I have following ? Different header and text alignment in winform datagrid I want to show column center aligned and text right...
    4. Datagrid wrappable column header text
      I may be missing something here, but could someone elaborate for me... Does the datagrid control provide the ability to wrap the column header...
    5. Datagrid not diplaying header text
      I am trying have a datgrid which always displays the column header text, even though the datareader to which it is bound is empty. I have a...
  3. #2

    Default Re: Wrap Header text in Datagrid (Flex 1.5)

    The only method I've come up with so far is calling a function you create to do
    the work with the headerText attribute. See below
    Function:
    var tabLabel = "";
    function wrap() {
    tabLabel = "Account"+chr(13)+"Location";
    return tabLabel;
    }
    Call:
    <mx:DataGridColumn headerText="{wrap()}" columnName="accountLocation"
    editable="false" width="55" />

    ymiles Guest

  4. #3

    Default Re: Wrap Header text in Datagrid (Flex 1.5)

    You can insert a break in an mxml tag property using {newline}
    Here is an example:
    Tracy


    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
    initialize="initUI()">
    <mx:Script><![CDATA[
    private var gaData:Array;
    function initUI():Void
    {
    gaData = new Array();
    gaData[0] = new Object({label:"Red", data:"#FF0000"});
    gaData[1] = new Object({label:"Green", data:"#00FF00"});
    gaData[2] = new Object({label:"Blue", data:"#0000FF"});
    }

    ]]></mx:Script>
    <mx:TextArea id="taWrap" text="one{newline}two{newline}three" height="100"
    width="300"/>
    <mx:DataGrid id="datagrid1" dataProvider="{gaData}" headerHeight="30">
    <mx:columns>
    <mx:Array>
    <mx:DataGridColumn headerText="Column{newline}1" columnName="label" />
    <mx:DataGridColumn headerText="Column 2" columnName="data" />
    </mx:Array>
    </mx:columns>
    </mx:DataGrid>
    <mx:Button label="Button" click="System.setClipboard(taWrap.text)"/>
    </mx:Application>

    ntsiii Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139