簡體   English   中英

Flash Builder(Flex 4):XML填充的數據網格,如何在某些行中添加圖像?

[英]Flash Builder (Flex 4): datagrid populated by XML, how can I add an image in some of the rows?

我有一個DataGrid表,其列name phone 在列name我想在name附近添加圖片。 如何在datagrid行中添加圖片?

<fx:Declarations>
    <fx:XMLList id="people" xmlns="">
        <test>
            <name>moshe</name>
            <phone>555</phone>
        </test>
    </fx:XMLList>
</fx:Declarations>

<mx:DataGrid id="dg" color="0x323232" width="532" rowCount="10" top="10" left="10" DataProvider="{people}">
    <mx:columns>
        <mx:DataGridColumn dataField="name" headerText="person name"/>
        <mx:DataGridColumn dataField="phone" headerText="phone"/>
    </mx:columns>
</mx:DataGrid>

我在以下URL中找到了一個有關如何實現此目標的簡單示例:

http://www.flex-blog.com/samples/sample2/ImageDependingOnData.html

您可以右鍵單擊Flex應用程序,然后單擊“查看源代碼”以查看源代碼。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM