flex中list的利用

来源:百度知道 编辑:UC知道 时间:2024/05/09 07:18:38
list从数据库里面读出数条数据,现在要对数据进行操作,就是将选中的一行数据,按up按钮,该行数据向上移一个位置,连续按可以一直移到最上面的位置,上移之后保证选中的还是这条数据,下移也是同样的道理,但是只是画面中数据的移动,并不对数据库操作,希望哪位高手能帮我解答。不胜感激。

不知是不是你想要的:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
width="550" height="400">

<mx:Script>
<![CDATA[
import mx.utils.ObjectUtil;
import mx.collections.*;

[Bindable]
private var dp:ArrayCollection=new ArrayCollection([
{Artist:'Pavement1', Album:'Slanted and Enchanted',
Price:11.99, InStock: true},
{Artist:'Pavement2', Album:'Crooked Rain, Crooked Rain',
Price:10.99, InStock: false},
{Artist:'Pavement3', Album:'Wowee Zowee',
Price:12.99, InStock: true},