I want to switch from one datagrid to another datagrid on the single click of a button. Please provide solution.
these are my two datagrids.
<mx:AdvancedDataGrid id="dg_class" x="0" y="0" ..>
<mx:AdvancedDataGrid id="dg" x="0" y="0" ..>
I want to switch from one datagrid to another datagrid on the single click of a button. Please provide solution.
these are my two datagrids.
<mx:AdvancedDataGrid id="dg_class" x="0" y="0" ..>
<mx:AdvancedDataGrid id="dg" x="0" y="0" ..>
I don´t know if I understood correctly but let´s try
button.addEventListener(MouseEvent.CLICK, toggleGrids);
function toggleGrids(e:MouseEvent):void{
dg_class.visible = !dg_class.visible;
dg.visible = !dg_class.visible;
}