<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
[Bindable]
private var expensesAC1:ArrayCollection = new ArrayCollection( [
{ Month: "Jan" },
{ Month: "Feb" },
{ Month: "Mar" },
{ Month: "Apr" },
{ Month: "May"} ]);
[Bindable]
private var expensesAC2:ArrayCollection = new ArrayCollection( [
{ Profit: 2000 },
{ Profit: 1000 },
{ Profit: 1500 },
{ Profit: 1800 },
{ Profit: 2400 } ]);
[Bindable]
private var expensesAC3:ArrayCollection = new ArrayCollection( [
{ Expenses: 1500},
{ Expenses: 200 },
{ Expenses: 500 },
{ Expenses: 1200},
{ Expenses: 575 } ]);
[Bindable]
private var expensesAC4:ArrayCollection = new ArrayCollection( [
{ Amount: 450 },
{ Amount: 600 },
{ Amount: 300 },
{ Amount: 900 },
{ Amount: 500 } ]);
private var ComboArray:ArrayCollection = new ArrayCollection( [
"Month" ,
"Profit",
"Expenses" ,
"Amount"
]);
private function a():void
{
switch(c.selectedIndex)
{
case 0:d.dataProvider=expensesAC1;break;
case 1:d.dataProvider=expensesAC2;break;
case 2:d.dataProvider=expensesAC3;break;
case 3:d.dataProvider=expensesAC4;break;
}
}
]]>
</mx:Script>
<mx:ComboBox x="10" y="95" id="c" dataProvider="{ComboArray}"
change="{a()}"></mx:ComboBox>
<mx:DataGrid x="114" y="97" id="d" dataProvider="{expensesAC1}">
</mx:DataGrid>
</mx:Application>
--
-----------------------------
Warm Regards,
HISSAM,
Soft Engg,
iThinkLabs Pvt Ltd.
India.
website:http://www.ithink-labs.com
http://www.yureekah.com
------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---