开发者

How can i show delete image in each row in a Data grid?

开发者 https://www.devze.com 2022-12-20 05:23 出处:网络
i want show a image onmouse over inside data grid to each row,so if i click on that image,some function should call(as per my requirement).

i want show a image onmouse over inside data grid to each row,so if i click on that image,some function should call(as per my requirement). how can i do this ?

<mx:DataGrid width="320" height="624" verticalScrollPolicy="on" dataProvider="{blocked_Usernames}" editable="true">
        <mx:columns>
            <mx:DataGridColumn headerTex开发者_运维问答t="Blocked User Name" dataField="blockedUsernames" editorDataField="value"/>
            <mx:DataGridColumn width="20" editable="false">
                <mx:itemRenderer >
                    <mx:Component >                         
                        <mx:Image source="@Embed('assets/image/Close.png')" width="10" height="10"  autoLoad="false"/>
                    </mx:Component>
                </mx:itemRenderer>
            </mx:DataGridColumn>    
        </mx:columns>
    </mx:DataGrid>


You have to create a new MXML Component (a HBox with a Label and an Image will do the trick) and use it as an itemRenderer.

You can check this example from the Adobe website.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号