Note that there are some explanatory texts on larger screens.

plurals
  1. POAdvanceddatagrid becomes empty while hiding the columns in the visible area
    primarykey
    data
    text
    <p>We are developing an advanceddatagrid in flex 3 such that the columns in that datagrid can be hidden when a particular state is called.</p> <p>While doing a sample we faced an issue that, we have certain columns in our datagrid, and we scrolled to last column ,and then now we are hiding the all the columns which are in the visible area. After this , all columns are disappeared. here i have attached the snapshots.<img src="https://i.stack.imgur.com/fHBKU.png" alt="Datagrid at initial stage"></p> <p>After clicking the Hide columns button , the advanceddatagrid becomes <img src="https://i.stack.imgur.com/sMWi5.png" alt="enter image description here"></p> <p>Please help me on this issue.</p> <p>Note: we have tried by using validateNow() while hiding each column. but that created a lot of preoblem with our item editors.</p> <p>My sample code snippet:</p> <pre><code>protected function button1_clickHandler(event:MouseEvent):void { myADG.columns[7].visible = false; myADG.columns[8].visible = false; myADG.columns[9].visible = false; myADG.columns[10].visible = false; } </code></pre> <p>My Sample Code:</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600"&gt; &lt;mx:Script&gt; &lt;![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.core.mx_internal; use namespace mx_internal; [Bindable] private var dpFlat:ArrayCollection = new ArrayCollection([ {Region:"Southwest", Territory:"Arizona", Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000}, {Region:"Southwest", Territory:"Arizona", Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000}, {Region:"Southwest", Territory:"Central California", Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000}, {Region:"Southwest", Territory:"Nevada", Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000}, {Region:"Southwest", Territory:"Northern California", Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000}, {Region:"Southwest", Territory:"Northern California", Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000}, {Region:"Southwest", Territory:"Southern California", Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000}, {Region:"Southwest", Territory:"Southern California", Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000} ]); protected function button1_clickHandler(event:MouseEvent):void { myADG.columns[7].visible = false; myADG.columns[8].visible = false; myADG.columns[9].visible = false; myADG.columns[10].visible = false; } ]]&gt; &lt;/mx:Script&gt; &lt;mx:Panel title="AdvancedDataGrid Control Example" height="75%" width="75%" layout="horizontal" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"&gt; &lt;mx:AdvancedDataGrid id="myADG" width="50%" height="60%" dataProvider="{dpFlat}" horizontalScrollPolicy="on" &gt; &lt;mx:columns&gt; &lt;mx:AdvancedDataGridColumn dataField="Region" width="100" headerText="1"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Territory" width="100" headerText="2" visible="true"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Territory_Rep" headerText="3" width="100" visible="true"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Actual" width="100" headerText="4" visible="true"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Estimate" width="100" headerText="5" visible="true"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Territory_Rep" headerText="6" width="100" visible="true"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Actual" width="100" headerText="7"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Estimate" width="100" headerText="8"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Territory_Rep" headerText="9" width="100"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Actual" width="100" headerText="10"/&gt; &lt;mx:AdvancedDataGridColumn dataField="Estimate" width="100" headerText="11"/&gt; &lt;/mx:columns&gt; &lt;/mx:AdvancedDataGrid&gt; &lt;mx:Button label="Hide Columns" click="button1_clickHandler(event)" /&gt; &lt;/mx:Panel&gt; &lt;/mx:Application&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload