1

次の画像のような mx:DataGrid コンポーネントを flex で作成したいと考えています。

ここに画像の説明を入力

ヘッダーに境界線を追加したり、ヘッダーの色を白に設定したりできますが、データ グリッドの行間に区切り線を引くことができません。

ここに私が使用しているコードがあります:

<mx:DataGrid id="dg" width="100%" height="100%" dataProvider="{arrDg}" draggableColumns="false"
                 resizableColumns="false" rowCount="{arrDg.length}" selectable="false" headerColors="[white, white]"
                 sortableColumns="false" variableRowHeight="true" verticalScrollPolicy="off"
                 borderColor="0x000000" borderSides="">
        <mx:columns>
            <mx:DataGridColumn backgroundColor="0xFFFFFF" color="0x000000" dataField="asdf"
                               headerText="asdf"
                               textAlign="center" />
            <mx:DataGridColumn backgroundColor="0xFFFFFF" color="0x000000" dataField="rteyre"
                              headerText="rteyre"
                               headerWordWrap="true" textAlign="center" wordWrap="true"/>
            <mx:DataGridColumn backgroundColor="0xFFFFFF" color="0x000000" dataField="xcv"
                              headerText="xcv" textAlign="center"/>
            <mx:DataGridColumn backgroundColor="0xFFFFFF" color="0x000000" dataField="hgj"
                              headerText="hgj"
                               headerWordWrap="true" textAlign="center" wordWrap="true"/>
            <mx:DataGridColumn backgroundColor="0xFFFFFF" color="0x000000" dataField="yuio"
                              headerText="yuio" textAlign="center"/>
        </mx:columns>
    </mx:DataGrid>
4

2 に答える 2

3

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/DataGrid.htmlプロパティhorizo ​​ntalGridLines ="false|true"およびverticalGridLines="false|true"を追加してください。追加する答えとして。ありがとう

于 2012-08-09T15:32:30.350 に答える
1

線の色を変えましたか?デフォルトで表示されます。データグリッドにこのスタイルを試してください。

verticalGridLineColor: #000000;
horizontalGridLineColor: #000000;
于 2012-08-09T15:22:50.077 に答える