2009-07-13 8 views
0

私はこのようなデータが入力されるAvancedDataGrid持っている:私はそれはあなたが日付列の日付をクリックすると、唯一の仲間と量の列がその日付を示すことにしたいFlex:AvancedDataGrid ..Group By?

<stat associate="Henry Smith" date="07/08/09" amount="1"/> 
<stat associate="John Doe" date="07/08/09" amount="1"/> 
<stat associate="John Doe" date="07/09/09" amount="2"/> 

を。どうやってやるの?

filterFunction:Function 
A function that the view will use to eliminate items that do not match the function's criteria. A filterFunction is expected to have the following signature: 

f(item:Object):Boolean 
where the return value is true if the specified item should remain in the view. 

そして、あなたにXMLListCollectionにそれを適用する:あなたは、フィルタ機能を記述する必要が

<mx:AdvancedDataGrid 
    id="wideGrid" 
    width="100%" 
    height="100%" 
    styleName="dataGrid" 
    dataProvider="{_statsXMLList}" 
> 
    <mx:columns> 
     <mx:AdvancedDataGridColumn id="wideGridCol1" 
       dataField="@associate" 
       headerText="Name" 
       width="110"/> 
     <mx:AdvancedDataGridColumn id="wideGridCol2" 
       dataField="@amount" 
       headerText="Amount" 
       width="50" /> 
     <mx:AdvancedDataGridColumn id="wideGridCol3" 
       dataField="@date" 
       headerText="Date" 
       width="60" /> 
    </mx:columns> 
</mx:AdvancedDataGrid> 

答えて

0

は、ここに私のAvancedDataGridです。この関数は、どこかに格納された日付の値に基づいてフィルタリングする必要があります。

ユーザーが行をクリックすると、その日付値を設定してからXMLListCollectionで最新表示を呼び出します。コレクションはデータグリッドにバインドされているので、テーブルは更新されます。

これはあなたがやろうとしていることですか、それともグループとは何か特別なことですか?