我有一个高级数据网格。我想清除按钮单击时的高级数据网格值,我使用了 sales=new ArrayCollection 但它不起作用我的代码是:
[Bindable]
private var sales:ArrayCollection = new ArrayCollection([
{Billno:"1", customerName:"vs",
phoneno:"1223456789", productName:"aaer",serialNo: "ajerf", saleDate:" 12/5/2013", quantity:1, priceperitem:12,total: 12},
{Billno:"2", customerName:"vs1",
phoneno:1223456789, productName:"aaer",serialNo: "ajerf", saleDate: " 12/5/2013", quantity:1, priceperitem:12,total: 12},
{Billno:"3", customerName:"vs",
phoneno:1223456789, productName:"aaer",serialNo: "ajerf", saleDate: " 12/5/2013", quantity:1, priceperitem:12,total: 12},
{Billno:"4", customerName:"vs1",
phoneno:1223456789, productName:"aaer",serialNo: "ajerf", saleDate: " 12/5/2013", quantity:1, priceperitem:12,total: 12},
{Billno:"5", customerName:"vs2",
phoneno:1223456789, productName:"aaer",serialNo: "ajerf", saleDate: " 12/5/2013", quantity:1, priceperitem:12,total: 12},
{Billno:"6", customerName:"vs2",
phoneno:1223456789, productName:"aaer",serialNo: "ajerf", saleDate: " 12/5/2013", quantity:1, priceperitem:12,total: 12}
]);
public function resetForm() :*
{
sales=new ArrayCollection();
}
我的高级数据网格是:
<mx:AdvancedDataGrid id="myADG1" width="100%" height="100%"
initialize="gc.refresh();" variableRowHeight="true">
<mx:dataProvider>
<mx:GroupingCollection2 id="gc" source="{sales}">
<mx:grouping>
<mx:Grouping label="Billno">
<mx:GroupingField name="customerName"/>
</mx:Grouping>
</mx:grouping>
</mx:GroupingCollection2>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn width="125" dataField="customerName" headerText="customer"/>
</fx:Component> </mx:itemRenderer>-->
</mx:columns>
</mx:AdvancedDataGrid>