eduardo12fox
asked on
Help in datagrid FLEX
I need to drag the column to the first grid and capture the name of the column in order to determine whether the column is visible or not. See sample:
http://www.techall.com.br/GRID/Index.html
http://www.techall.com.br/GRID/Index.html
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]">
<mx:Script>
<![CDATA[
]]>
</mx:Script>
<mx:Style>
Application {
backgroundImage:"Imagem/fundo2.jpg";
}
</mx:Style>
<mx:XMLList id="employees">
<employee>
<name>Christina Coenraets</name>
<phone>555-219-2270</phone>
<email>ccoenraets@fictitious.com</email>
<active>true</active>
<image>images/arrow_icon_sm.png</image>
</employee>
<employee>
<name>Joanne Wall</name>
<phone>555-219-2012</phone>
<email>jwall@fictitious.com</email>
<active>true</active>
</employee>
<employee>
<name>Maurice Smith</name>
<phone>555-219-2012</phone>
<email>maurice@fictitious.com</email>
<active>false</active>
</employee>
<employee>
<name>Mary Jones</name>
<phone>555-219-2000</phone>
<email>mjones@fictitious.com</email>
<active>true</active>
</employee>
</mx:XMLList>
<mx:Canvas y="77" width="1000" height="692" backgroundColor="#FFFFFF" alpha="1.0" borderStyle="solid" cornerRadius="10" horizontalCenter="8" borderThickness="3" backgroundAlpha="0.36">
<mx:ViewStack x="0" y="0" id="viewstack1" width="994" height="686">
<mx:Canvas label="View 1" width="100%" height="100%">
<mx:Canvas x="10" y="10" width="165" height="666" backgroundColor="#FFFFFF" borderStyle="solid" cornerRadius="10" backgroundAlpha="0.19">
<mx:Canvas x="0" y="0" width="163" height="664" horizontalScrollPolicy="off">
<mx:Canvas x="0" y="0" width="163" height="914">
<mx:DataGrid x="5" y="10" width="138" height="255" dataProvider="[]" color="#000000" fontWeight="bold" dragEnabled="true" dropEnabled="true" dragMoveEnabled="true">
<mx:columns>
<mx:DataGridColumn headerText="AGRUPAMENTO" dataField="name"/>
</mx:columns>
</mx:DataGrid>
<mx:DataGrid x="6" y="285" width="137" height="255" color="#000000" fontWeight="bold">
<mx:columns>
<mx:DataGridColumn headerText="EXIBIR COLUNAS" dataField="col1"/>
</mx:columns>
</mx:DataGrid>
<mx:DataGrid x="4" y="595" width="138" height="89" color="#000000" fontWeight="bold">
<mx:columns>
<mx:DataGridColumn headerText="FILTRAR COLUNA" dataField="col1"/>
</mx:columns>
</mx:DataGrid>
<mx:HRule x="2" y="272" height="5" width="160"/>
<mx:HRule x="2" y="582" height="5" width="160"/>
<mx:DataGrid x="10" y="755" width="133" height="149" color="#000000" fontWeight="bold">
<mx:columns>
<mx:DataGridColumn headerText="CÁLCULAR COLUNA" dataField="col1"/>
</mx:columns>
</mx:DataGrid>
<mx:HRule x="2" y="742" height="5" width="160"/>
<mx:HRule x="2" y="692" height="5" width="160"/>
<mx:CheckBox x="26" y="548" label="EXIBIR TODAS" fontWeight="bold" color="#000000"/>
<mx:CheckBox x="26" y="708" label="QUANTIDADE" fontWeight="bold" color="#000000"/>
</mx:Canvas>
</mx:Canvas>
</mx:Canvas>
<mx:Canvas x="183" y="10" width="801" verticalScrollPolicy="off" horizontalScrollPolicy="off" height="44" backgroundColor="#FFFFFF" borderStyle="solid" cornerRadius="10" backgroundAlpha="0.19">
<mx:Label x="11" y="12" text="EXPORTAR EM:" fontStyle="normal" fontWeight="bold" color="#000000"/>
<mx:Image x="124" y="3" source="Imagem/EXCEL.png"/>
<mx:Image x="168" y="3" source="Imagem/WORD.png"/>
<mx:Image x="211" y="4" source="Imagem/IE.png"/>
<mx:Image x="253" y="4" source="Imagem/PDF.png"/>
<mx:Image x="312" y="3" source="Imagem/GRAFICOS.png" buttonMode="true" click="{GRAFICOS.visible = true}"/>
<mx:VRule x="291" y="6" width="6" height="32"/>
<mx:Label x="441" y="14" text="FILTRAR" fontStyle="normal" fontWeight="bold" color="#000000"/>
<mx:TextInput x="504" y="11" width="285"/>
</mx:Canvas>
<mx:Canvas x="183" y="62" width="801" height="563">
<mx:DataGrid x="0" y="0" width="1500" dataProvider="{employees}" height="544" id="GRID" allowMultipleSelection="true" dragEnabled="true" dragMoveEnabled="true">
<mx:columns>
<mx:DataGridColumn headerText="Column 1" dataField="name" id="a"/>
<mx:DataGridColumn headerText="Column 2" dataField="phone"/>
<mx:DataGridColumn headerText="Column 3" dataField="email"/>
<mx:DataGridColumn headerText="Column 1" dataField="active"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
<mx:DataGridColumn headerText="Column 3" dataField="col3"/>
<mx:DataGridColumn headerText="Column 1" dataField="col1"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
<mx:DataGridColumn headerText="Column 3" dataField="col3"/>
</mx:columns>
</mx:DataGrid>
<mx:Canvas x="173" y="3" width="269" visible="false" height="60" backgroundColor="#EBEBEE" borderStyle="solid" cornerRadius="10" id="GRAFICOS">
<mx:LinkButton x="10" y="22" label="PIZZA" color="#000000" themeColor="#E46C01"/>
<mx:LinkButton x="75" y="22" label="COLUNAS" color="#000000" themeColor="#E46C01"/>
<mx:LinkButton x="157" y="22" label="BARRAS" color="#000000" themeColor="#E46C01"/>
<mx:Image x="245" y="2" source="Imagem/1267291268_x.png" buttonMode="true" click="{GRAFICOS.visible = false}"/>
</mx:Canvas>
</mx:Canvas>
</mx:Canvas>
<mx:Canvas label="A" width="100%" height="100%">
</mx:Canvas>
</mx:ViewStack>
</mx:Canvas>
<mx:ControlBar x="0" y="0" width="100%" height="55">
<mx:Image source="Imagem/logo_peq.png"/>
</mx:ControlBar>
</mx:Application>
i cannot understand your requeremetns you can drag ONLY visible columns
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This solution very important for project that'm doing. It was perfect! Fantastic!
Thanks