Rearrange column in Datagrid in Flex

Hi, i am retrieving data from database using arraycollection to fill in the datagrid with dynamic column header, and the columns are arranger alphabatically depend on the column header title, for my case i want to rearrange the columns depend on specific order, i created another function to rearrange the columns, and its working fine for the first page load but when i change the dropdown entries i get all the columns rearranged but without data only the first column contain data which is [EngName]
the following is my code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" layout="vertical"  width="70%" backgroundAlpha="1" backgroundColor="white" xmlns:local="*">
<mx:WebService id="wsExec" wsdl="http://wfsvc-test/ExecSummaryReport.asmx?WSDL" useProxy="false" showBusyCursor="true">
<mx:operation name="GetExecSummary2" result="handleExecSummaryResult(event)" fault="handleFault(event)"/>
</mx:WebService>
<mx:WebService id="wsAdmin" wsdl="http://wfsvc-test/Admin.asmx?wsdl" useProxy="false" showBusyCursor="true">
<mx:operation name="SelectDirectorates" result="handleDir(event)" fault="handleFault(event)"/>
<mx:operation name="SelectSections" result="handleSec(event)" fault="handleFault(event)"/>
</mx:WebService>
<mx:Script>
<![CDATA[
import mx.controls.dataGridClasses.DataGridColumn;
import mx.messaging.AbstractConsumer;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
[Bindable]
private var gridData:ArrayCollection;
[Bindable]
private var dirData:ArrayCollection;
[Bindable]
private var secData:ArrayCollection;
private function init():void
  wsAdmin.SelectDirectorates();
  var today:Date = new Date();
  today.setDate(1);
  dtFrom.selectedDate =today;
  dtTo.selectedDate = new Date();
private function handleExecSummaryResult(event:ResultEvent):void
  for each(var objTbl:Object in event.result.Tables)
   gridData = objTbl.Rows as ArrayCollection;
  dg.dataProvider = gridData;
  var columns:Array = dg.columns.sort(orderColumns);
  dg.columns = columns;
  dg.visible = true;
private function orderColumns(a:DataGridColumn, b:DataGridColumn):int{
   if (a.headerText == "EngName" || b.headerText == "EngName"){
          return -1;
   }else if (a.headerText < b.headerText){
          return -1;
   }else if (a.headerText > b.headerText){
           return 1;
  } else {
    return 0;
private function handleDir(event:ResultEvent):void
  var dirArr:Array = new Array();
  var defaultItem:Object = new Object();
  defaultItem['data'] = '00';
  defaultItem['label'] = '-- Select Directorate --';
  dirArr.push(defaultItem);
  for each(var objTbl:Object in event.result.Tables)
   for each(var objRow:Object in objTbl.Rows)
    var obj:Object = new Object();
    obj['label'] = objRow['EngDir'];
    obj['data'] = objRow['DirCode'];
    dirArr.push(obj);
  dirData = new ArrayCollection(dirArr);
private function handleSec(event:ResultEvent):void
  var secArr:Array = new Array();
  var defaultItem:Object = new Object();
  defaultItem['data'] = '00';
  defaultItem['label'] = '-- Select Section --';
  secArr.push(defaultItem);
  for each(var objTbl:Object in event.result.Tables)
   for each(var objRow:Object in objTbl.Rows)
   var obj:Object = new Object();
   obj['label'] = objRow['EngSec'];
   obj['data'] = objRow['SecCode'];
   secArr.push(obj);
  secData = new ArrayCollection(secArr);
private function handleFault(event:FaultEvent):void
  Alert.show(event+'');
]]>
</mx:Script>
<mx:Label width="100%" textAlign="center" text="Executive Summary Report" fontSize="24"/>
<mx:HBox width="100%">
<mx:HBox width="100%" horizontalAlign="right" verticalAlign="middle" >
</mx:HBox>
</mx:HBox>
<mx:HBox width="100%">
  <mx:Label text="Search: From"/>
  <mx:DateField id="dtFrom" name="n1" formatString="DD/MM/YYYY"/>
  <mx:Label text=" To "/>
  <mx:DateField id="dtTo" name="n1" formatString="DD/MM/YYYY"/>
  <mx:Label text="   Directorate:"/>
  <mx:ComboBox id="ddlDir" dataProvider="{dirData}" width="170">
   <mx:change>
    <![CDATA[
     wsAdmin.SelectSections(ddlDir.selectedItem['data'].toString());
    ]]>
   </mx:change>
  </mx:ComboBox>
  <mx:Label text=" Section:"/>
  <mx:ComboBox id="ddlSec" dataProvider="{secData}" width="170"/>
  <mx:Label text="Status: "/>
   <mx:CheckBox id="chkCompleted" label="Completed" selected="true">
    <mx:click>
     <![CDATA[
      chkCompleted.selected = true;
      chkInProgress.selected = false;
     ]]>
    </mx:click>
   </mx:CheckBox>
   <mx:CheckBox id="chkInProgress" label="In Progress">
    <mx:click>
     <![CDATA[
      chkCompleted.selected = false;
      chkInProgress.selected = true;
     ]]>
    </mx:click>
   </mx:CheckBox>
  <mx:Button label="Show Report">
   <mx:click>
    <![CDATA[
     if(ddlDir.selectedIndex<1 || ddlSec.selectedIndex<1)
      Alert.show('Please select a Directorate & Section');
     }else
      wsExec.GetExecSummary2(ddlDir.selectedItem['data'],ddlSec.selectedItem['data'],chkInProgr ess.selected,dtFrom.selectedDate,dtTo.selectedDate);
    ]]>
   </mx:click>
  </mx:Button>
</mx:HBox>
<mx:DataGrid id="dg" width="100%" rowCount="12"  visible="false"/>
</mx:Application>

I'm suspicous about how it can return -1 for both A.headerText and
b.headerText == "EngName"

Similar Messages

  • How to get selected values (using checkBox) from DataGrid in flex.

    i have a datagrid which is getting values from a XML file (getting this xml file from database using PHP and HTTP request in flex). i have created a checkbox in every row in data grid. and here is my requirement: i want to select tow or three check-box and would like to get all the values form that particular ROWs in some form , prefered arraycollection (such that i can pass this array directly to a bar chart) .. can some one help me as i am new to flex .
    code ......
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="siteData.send()">
              <mx:Script>
                        <![CDATA[
                                  import mx.collections.XMLListCollection;
                                  import mx.controls.*;
                                  import mx.events.ListEvent;
                                  import mx.rpc.events.ResultEvent;
                                  import mx.controls.Alert;
                                  [Bindable] private var fullXML:XMLList;
                                  private function contentHandler(evt:ResultEvent):void{
                                            fullXML = evt.result.values;
                        ]]>
              </mx:Script>
              <mx:VBox>
                        <mx:Label text="This Data Grid is loading the full XML file"/>
                        <mx:DataGrid width="600"  id="datagrid" dataProvider="{fullXML}">
                                  <mx:columns>
                                            <mx:DataGridColumn headerText="Select">
                                                      <mx:itemRenderer>
                                                                <mx:Component>
                                                                          <mx:HBox horizontalAlign="center">
                                                                                    <mx:CheckBox id="check"/>
                                                                          </mx:HBox>
                                                                </mx:Component>
                                                      </mx:itemRenderer>
                                            </mx:DataGridColumn>
                                            <mx:DataGridColumn dataField="release_version" headerText="Release"/>
                                            <mx:DataGridColumn dataField="build" headerText="build"/>
                                            <mx:DataGridColumn dataField="time_login" headerText="time_login"/>
                                            <mx:DataGridColumn dataField="time_tunnel" headerText="time_tunnel"/>
                                            <mx:DataGridColumn dataField="rate_login" headerText="time_tunnel"/>
                                            <mx:DataGridColumn dataField="rate_tunnel" headerText="rate_tunnel"/>
                                  </mx:columns>
                        </mx:DataGrid>
              </mx:VBox>
              <mx:HTTPService url="http://localhost/php_genxml.php" id="siteData" result="contentHandler(event)" resultFormat="e4x"/>
    </mx:Application>
    as you can see in the image , i will get this datgrid . now i want to select two or three checkboxes and would like to get all the values form the perticular row (for which check box is selected). i would like to get in array from such that i can driectly pass them to bar chart....
    can some one help me in this. as i m new to flex. or if you have some other suggestion ...My final requirement is: select some values and generate bar gharph for those values.
    please help me in this.
    thanks
    tanuj

    Hi Timo -
    Thanks for the suggestion. I could get the values as below:
    public void multiOpUnitValChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding opUnitIter = (DCIteratorBinding)bindings.get("OperatingUnit2VOIterator");
    Integer[] values = (Integer[])valueChangeEvent.getNewValue();
    for (int i=0; i<values.length; i++){
    Row row = opUnitIter.getRowAtRangeIndex(i);
    System.out.println(row.getAttribute("OpUnitId"));
    Thanks -
    Rohit

  • Visible Columns of dataGrid

    Hi,
    How to calculate width of the datagrid columns which are visible and invisible.
    I have a datagrid which has visibe and invisible column and have given fixed width 80.
    When the visbile columns are displayed on the screen , the width is seen neven since invisivle columns are also incuded in the layout.
    Is there anything like IncludeInLayout for datagricolumns in flex?
    Thanks and Regards,
    Shweta

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    mx.controls.AdvancedDataGrid (Flex 3):
    ... DataGrid control to add data visualization features to
    your Adobe Flex application. .... [read-only] Returns the x
    position of the mouse, in the content
    Link:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/AdvancedDataGrid.html
    [#SDK-14808] Editable [Advanced]DataGrid incorreclty enters
    edit:
    Editable [Advanced]DataGrid incorreclty enters edit mode when
    focus ... Even if the right-mouse click was on a different cell,
    the previous cell will begin
    Link:
    http://bugs.adobe.com/jira/browse/SDK-14808
    Flex 3 - Image control:
    For example, place your mouse pointer over the image in this
    example to enlarge .... When a user changes the currently selected
    item in the data grid, Flex
    Link:
    http://livedocs.adobe.com/flex/3/html/controls_16.html
    Flex 3:Feature Introductions: Advanced DataGrid - Adobe Labs:
    Jun 11, 2007 ... Flex 3:Feature Introductions: Advanced
    DataGrid. From Adobe Labs ... on the individual cells to select
    them via the mouse instead.
    Link:
    http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Advanced_DataGrid
    Flex Fun - Advanced DataGrid Topics:
    Flex Fun - Advanced DataGrid Topics. This tutorial is going
    to build on an earlier ..... I will touch on just a small number of
    them in this tutorial.
    Link:
    http://blog.paranoidferret.com/index.php/2007/08/29/flex-fun-advanced-datagrid-topics/
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • How to validate a whole column of DataGrid

    I want to validate a whole column of DataGrid using
    Validator.
    How to do that?

    Thanks. It works! Prima!
    It's a little bit difficult for me to write and understand the English terms correctly, cause I am German.
    I did not recognize, that I had to go to the Library Module!
    Here I repeat Rikk's way in German:
    Im Bibliothek-Modul
    Rasteransicht
    Bilder selektieren
    Im Menufeld Ad-hoc Entwicklung:
    Freistellungsfaktor einstellen: 16:9

  • Add and remove option in DataGrid in flex

    Dear Friends,
                    I have a datagrid which we can add a row and remove the row.In this DataGrid when i clicked to add new row im getting check Box at first,which i dont want to need at first.Pls help me regarding this.Please find the screen shot and code here.
    <fx:Script>
            <![CDATA[
    [Bindable]
                private var archiveData:ArrayCollection;
    private static const ADD_ARCH_ROW:String = "Click to Add Archive Row";
                private function checkArchiveEditBegin(e:DataGridEvent):void
                    if(e.rowIndex == archiveData.length - 1 && e.columnIndex != 1)                       
                        e.preventDefault();
                private function ediArchivetEnd(e:DataGridEvent):void
                     var item:Object = archiveGrid.dataProvider.getItemAt(e.rowIndex);           
                    if(e.rowIndex == archiveData.length - 1)
                        var txtIn:TextInput =     TextInput(e.currentTarget.itemEditorInstance);                   
                        var dt:Object = e.itemRenderer.data;                   
                        if(txtIn.text != ADD_ARCH_ROW)
                            archiveData.addItemAt(new archiveDetails(txtIn.text, "", ""), e.rowIndex);
                        archiveGrid.destroyItemEditor();                                   
                        e.preventDefault();
                public function deleteArchiveRow(e:MouseEvent):void{                           
                    archiveData.removeItemAt(archiveGrid.selectedIndex);
                    archiveData.refresh();               
                protected function AddArchiveRows(event:MouseEvent):void
                    archiveData = new ArrayCollection();                       
                    archiveData.addItem({archiveFrom: ADD_ARCH_ROW});               
                    archiveGrid.visible = true;               
                protected function button2_clickHandler(event:MouseEvent):void
                    if(archiveData.length!=1){
                    archiveData.removeItemAt(archiveGrid.selectedIndex);
    <mx:DataGrid id="archiveGrid" dataProvider="{myData}" x="399" y="6" width="539" height="169" visible="false" sortableColumns="false" editable="true"
                     itemEditBeginning="checkArchiveEditBegin(event)"
                     itemEditEnd="ediArchivetEnd(event)">
            <mx:columns>
                <mx:DataGridColumn id="arc" headerText="" width="50" editable="false">
                    <mx:itemRenderer>
                        <fx:Component>
                            <mx:CheckBox textAlign="center" click="outerDocument.deleteArchiveRow(event)"/>
                        </fx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
                <mx:DataGridColumn headerText="FROM" dataField="archiveFrom" width="300"/>
                <mx:DataGridColumn headerText="TO" dataField="archiveTo" width="125"/>
                <mx:DataGridColumn headerText="DAYS" dataField="archiveDays" width="100"/>           
            </mx:columns>
        </mx:DataGrid>
    <s:Button x="444" y="266" label="Delete" click="button2_clickHandler(event)"/>

    Dear Frnds,
                    Please Help me to do the above bussiness.....

  • How to create file system datagrid in flex web application

    how to create file system datagrid in flex web application

    Hi,
    Check this out:
    http://shigeru-nakagaki.com/flex_samples/FileReference/FileUploadExample2/FileUploadExampl e2.html
    Johnny
    Please rate answer.

  • Progress Bar in Datagrid in flex

    Hi,
    I have a urgent requirement, which needs to have ProgressBar
    in DataGrid. I want to set progress for each of the ProgressBar in
    datagrid to be binded to a cloum (i.e your progress bar column is
    binded to some object in array collection). Please do let me know
    how this is possible. It would be great favour if it is possible to
    do it using manual mode.
    I used following mxml
    <mx:AdvancedDataGridColumn id="teamProgress" width="120"
    headerText="Team" dataField="TeamProgress">
    <mx:itemRenderer><mx:Component><mx:HBox
    verticalAlign="middle"> <mx: ProgressBar id="PB"
    trackHeight="13" barColor="red" trackColors="[White, haloSilver]"
    borderColor="black" width="75" textAlign="right"
    styleName="progressBar" mode="manual" label="data.TeamProgress"
    height="13"/></mx:HBox></mx:Component></mx:itemRenderer>
    </mx:AdvancedDataGridColumn>.
    How to support static binding of the progress bar column of
    DataGrid to some object in ArrayCollection.
    I want this progress bar column to be clickable.

    Hi,
    Please find the code for implementing a progress bar in
    DataGrid at the URL below. You will find code for sample
    application which is using Adobe share API. In this application
    they implemented a progress bar in a DataGrid.
    https://share.acrobat.com/adc/document.do?docid=fa29c796-dc18-11dc-a7df-2743035249fa
    Hope this helps.

  • Erase columns in DataGrid

    greets, long time without doubts
    my question is:
    i have 2 DataGrids the first one has one fixed column , the second one has 4 fixed columns
    i use a button to convert the rows of the DataGrid 1 in columns, then if i delete a row in the DataGrid 1 it must delete the corresponding column in the DataGrid 2
    how i can delete the columns of DataGrid 2 in that way???

    If you want to delete the content of the column, you must work on the DataGrid's dataProvider.
    If you want to remove the column, you can use :
    var columnsCollection    :ArrayCollection = new ArrayCollection( yourDataGrid.columns );
    columnsCollection.removeItemAt( columnsCollection.getItemIndex( youDataGridColumn ) );
    yourDataGrid.columns = columnsCollection.toArray();

  • How to hide blank columns in datagrid?

    Hi,
    I have a datagrid nicely populated with data.
    But I have some colums which are blank (the columns have a
    Header but the rest of its rows are blank).
    I want to hide these columns so that users can't see them.
    Note that the blank columns are not fixed. Sometimes it can
    be that a column is blank but at other times it can be filled.
    So I cannot use... "<... visible=false>
    I need to loop thru the columns and then hide the blank
    columns.
    Anyone has an idea how to code for this loop.
    Thx

    Well..from what i know, the datagrid supports the syntax to
    allow for you to specify the columns explicitly through the
    DataGridColumn. Done like this
    <mx:datagrid>
    <mx:columns>
    <mxdatagridcolumn datafield = "Column 1 name" ..>
    <mxdatagridcolumn datafield = "" ..>
    <mxdatagridcolumn datafield = "" ..>
    </mx:columns>
    </mx:datagrid>
    why dont you specify the columns you want using this. that
    way, if there is no data in the colums, that column just wont show.
    Hope i am understanding you right when you say hide blank
    columns

  • Datagrid rearranging columns?

    I'm having a problem. This code i have written will import
    the XML but it rearranges the fields when i do this:
    "for (var subKey:String in data[0])"
    All of the fields come through but the subKey order is not in
    the order of the actual XML. Is there any way to get the
    "$ColumnNames[$w]" var from php over to flex in the same order?
    I don't know if i just reinvented the wheel, but it was
    definitely a good learning experience.
    MXML is first then PHP is second. Some of the code is copied
    off other examples. I didn't see any copyrights but let me know if
    there are any problems. O and the error thing doesn't work on the
    PHP page.

    I am look for a solution to a similar problem.
    I've got this nice little .fla that displays a DataGrid component (Flash CS3 Professional) using a DataProvider created from XML loaded from URLRequest/URLLoader (.asp source, but could be PHP, etc.).
    It works great except for one little annoying item.  The order of the columns seems to be totally arbitrary.
    I was expecting the order of the column to be the same as they occur in the XML DATA element.
    Here is a sample DATA element (there are serveral such DATA elements in the XML:
    <DATA>
      <AreaID>TNV</AreaID>
      <AreaName>TN, VA</AreaName>
      <MaxDvrHT>4</MaxDvrHT>
      <BoardName>TN, VA</BoardName>
      <RegionName>SOUTHEAST</RegionName>
      <salesGroup>David</salesGroup>
    </DATA>
    Here is the function that builds DataGrid:
    function returnAJAXcallback(evtObj:Event):void{
    // executed by URLLoader event listener "complete"
    // load the XML returned from .asp into XML object
    var myXML:XML = XML(evtObj.target.data);   
    // create a data provider from the XML
    var myDP = new DataProvider(myXML);  
    // create a DataGrid
    var myDataGrid:DataGrid = new DataGrid;  
    // set the data provider
    myDataGrid.dataProvider=myDP;   
    myDataGrid.width = 900;
    myDataGrid.height = 500;
    // show DataGrid on stage
    addChild(myDataGrid);     
    for each (var child:XML in myXML.DATA) {
      trace(child) ;  // list each DATA segment
    Here is the order that the columns appear in the DataGrid (left to right):
    AreaName
    RegionName
    salesGroup
    AreaID
    MaxDvrHT
    BoardName
    So, how in the world does Flash come up with this order?
    Why not default to the order in which the columns appear in the XML?
    Now, if some nice person knows the answer (I'm pretty new to Flash), what do I need to do (with as little code as possible) to get the columns ordered in a similar fashion to the order in which the XML data elements appear?
    Thanks to all.

  • Sort Column Date - DataGrid - Flex 4.5.1

    Hi
    I made download the function (below)  to sort column date in DateGrid, but is not working
    private function date_sortCompareFunc(itemA:
    Object, itemB:Object):int
       var dateA:Date=new Date(Date.parse(itemA.dob));
        var dateB:Date=new Date(Date.parse(itemB.dob));
       return ObjectUtil.dateCompare(dateA, dateB);
    <s:GridColumn dataField="DATA_VENCIMENTO_ID"
        width="115"
        headerText="Data Vencimento"
         dataTipFunction="date_sortCompareFunc">
    someone can help me?
    Marcos

    Hi Marcos,
    This forum here is for questions related to the LiveCycle Collaboration Service product.
    You might want to post your question to the Flex forum:
    http://forums.adobe.com/community/flex/flex_general_discussion
    Hope this helps.
    Good luck,
    Julien
    LCCS Quality Engineering

  • Datagrid for flex mobile apps

    Hello,
    Since in-built Datagrid component is not optimized to be used in flex mobile apps, what is the best alternative we can go ahead with?
    I have seen some of the posts which says that we can use List. But I'm still unable to find how List can be used. As we would need multiple columns, should we be using multiple Lists for each column?
    Kindly let me know if any of have have got this working and how.
    Appreciate your help..
    -Deepak

    Anyone please?:) Flex HarUI ??

  • How to hide column of DataGrid

    I am making a web part in which I am using System.Web.UI.WebControls.DataGrid control.
    It's AutoGenerateColumns property is set to TRUE.
    I am trying to hide a column at run time. I have written the following code on this controls ItemCreated event but it only works if I e.Item.Cells[0] and it doesn't work for any other value for e.g. e.Item.Cells[1] and e.Item.Cells[6].
    There are 9 columns in my DataGrid control.
    Code
    protected void grd1_ItemCreated(object sender, DataGridItemEventArgs e)
    { e.Item.Cells[0].Visible = false; //works fine
    e.Item.Cells[1].Visible = false; //gives error e.Item.Cells[2].Visible = false; //gives error
    Error
    Specified argument was out of the range of valid values.
    Parameter name: index
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    How to hide a particular column?

    Hi Frank,
    You can try something similar to the below in 'RowCreated' event Instead
    protected void gridView_RowCreated(object sender, GridViewRowEventArgs e)
    e.Row.Cells[1].visible =false;
    OR I would say hiding column is not something that is to be done at row level, so you can hide columns outside any of the grid view event after binding.
    e.g.
    gridview1.columns[1].visible=false;
    I am using DataGrid control in which there is no RowCreated event.
    I have tried second approach but it also doesn't work.

  • Does compiling an advanced datagrid using flex ant task require additional config other than the license property?

    Hi,
        I am trying to build my Flex app which uses the Advanced Data Grid in a couple of locations. Originally, when I built the app using the flex ant tasks, I noticed the Visualization Trial watermark show up on the screen. I then added the license tag with the serial number to my flex-config.xml and re-ran my ant build. The watermark goes away, but then when I look at the advanced datagrid, the datagrid shows up with the hierarchy, but the data does not display in the grid (only the group by nodes are visible, not the data for the leaf elements). This works fine when I build the app using my Flex Builder. Is there something I am missing or need to add to my flex ant task to make this work?
    Any help or guidance is much appreciated.
    The following is the ant task to build the module that uses the ADG:
        <target name="compile-modules" depends="compile-shared">
            <!-- Module 1 -->
            <echo>Compiling module 1...</echo>
            <mxmlc file="${modulesrc.dir}\ui\modules\mod1\Module1.mxml"
                    output="${dist.dir}\modules\mod1\Module1.swf"
                    actionscript-file-encoding="UTF-8"
                    incremental="true"
                    default-background-color="0xFFFFFF"
                    use-network="false"
                    load-externs="${extern-report-xml}">
                <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
                <source-path path-element="${FLEX_HOME}/frameworks"/>
                <!-- source paths -->
                <compiler.source-path path-element="${modulesrc.dir}"/>
                <!-- add external libraries -->
                <compiler.library-path dir="${main.dir}" append="true">
                    <include name="${lib.dir}"/>
                </compiler.library-path>
                <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs" />
                    <include name="locale/{locale}" />
                </compiler.library-path>
                <compiler.debug>true</compiler.debug>
            </mxmlc>
        </target>
    And here is the ant task for the main application:
        <target name="compile-ui" depends="compile-modules">
            <mxmlc file="${src.dir}/MainApp.mxml" output="${dist.dir}/MainApp.swf"
                    actionscript-file-encoding="UTF-8" keep-generated-actionscript="false"
                    fork="true" maxmemory="1024m">
                <jvmarg value="-XX:MaxPermSize=256m"/>
                <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                <source-path path-element="${FLEX_HOME}/frameworks"/>
                <source-path path-element="${src.dir}"/>
                <source-path path-element="${main.dir}/locale/{locale}"/>
                <!-- List of SWC files or directories that contain SWC files. -->
                <!--<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs" />
                    <include name="locale/{locale}" />
                </compiler.library-path>-->
                <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs/datavisualization.swc" />
                    <include name="libs/flex.swc" />
                    <include name="libs/framework.swc" />
                    <include name="libs/rpc.swc" />
                    <include name="libs/utilities.swc" />
                    <include name="locale/{locale}" />
                </compiler.library-path>
                <compiler.library-path dir="${main.dir}" append="true">
                    <include name="${lib.dir}"/>
                </compiler.library-path>
                <runtime-shared-library-path path-element="${FLEX_FRAMEWORK}/framework.swc">
                    <url rsl-url="framework_3.2.0.3958.swf"/>
                    <url rsl-url="framework_3.2.0.3958.swz"/>
                </runtime-shared-library-path>
                <compiler.debug>true</compiler.debug>
            </mxmlc>
        </target>
    Regards,
    Purush

    to remove watermark i have added license key in WEB-INF\flex\license.properties file as key = value

  • Dynamic columns in datagrid

    Hi,
    I have a datagrid with a dataprovider.
    And,I am trying to set the number of columns and column
    headerText values of that Datagrid based on the values from an
    array.
    Any suggestions on how we can do this or does anybody has
    already worked on this?
    Those suggestions would of very great help to me.

    Assume that your colum information is contained in the Array
    columnInfo which is not your dataProvider. Assume "dg" is the ID of
    your DataGrid control.
    var columns:Array = new Array(); // this will hold the
    DataGridColumns
    for(var c:int=0; c < columnInfo.length; c++) {
    var col:DataGridColumn = new DataGridColumn();
    col.headerText = columnInfo[c].headerText; // or whatever
    holds the header text
    col.dataField = columnInfo[c].dataField; // or what holds the
    name of the field in the dataProvider
    columns.push(col);
    dg.columns = columns; // columns now added to the
    DataGrid.

Maybe you are looking for

  • HT4009 I download LINE,Smile brush I didn't receive this application

    I download LINE,Smile brush I didn't receive this application purchase 1.99 Order number M2XL5Y9XWB I download LINE,Smile brush I didn't receive this application purchase 1.99 Order number M2XL5Y9XWB I download LINE,Smile brush I didn't receive this

  • Updating table

    hi friends, i have one table in my application. i will update cells by enetering data into it. here the problem is after i typed digits i need to press ENTER or i need to press TAB to update the entered value into table cell. is there any way that wi

  • Help i cant run my webservice...

    when i click "Test Web Service" then error occur.... *** Using port 7101 *** "C:\Documents and Settings\ASL\Application Data\JDeveloper\system11.1.1.5.37.60.13\DefaultDomain\bin\startWebLogic.cmd" [waiting for the server to complete its initializatio

  • Airport utility unable to set up Time Capsule Configuration

    Hi. I need to reconfigure my TC. It has a orange blinking light and when I try to access it with Airport utility, it sees it but will not set it up. I get a error 'An error occurred while reading the configuration. Make sure your Apple wireless devic

  • FAQ: Installing Elements 10, or What do all these disks do?

    When you purchase Photoshop and/or Premiere Elements 10 as a boxed product, you get a fair number of disks. The main reason for this is that a boxed product purchase of Elements is dual platform, that is, it's for both Windows and Macintosh. When dea