How to add the column to Adobe flex mxml or actionsctpt mx:DataGrid?

I have the simple mxml code

<mx:DataGrid id="DGG"
            
editable="true">
   
<mx:dataProvider>
       
<mx:Object scheduledDate="4/1/2006"/>
   
</mx:dataProvider>
</mx:DataGrid>
<mx:Button id="SetBut"
          
label="Set Array as Data Provider"
          
click="SetDP(); AddBut.visible = true;"
          
x="100.5"
          
y="164"
          
width="211"/>
<mx:Button id="AddBut"
          
label="Add a column!"
          
click="AddCol();"
          
x="100.5"
          
y="194"
          
width="211"
          
visible="false"/>
<mx:Script>
    <![CDATA[
        import mx.controls.dataGridClasses.DataGridColumn;
        import mx.collections.ArrayCollection;

        [Bindable]
        public var MyAC:ArrayCollection=new ArrayCollection([{scheduledDate: "4/1/2006", homeTeam: "Chester Bucks"}]);

        public function SetDP():void
        {
            DGG.dataProvider=MyAC
        }

        public function AddCol():void
        {
            MyAC.addItem({scheduledDate: "4/5/2007", homeTeam: "Long Valley Hitters", Umpire: "Amanda Hugenkis"});
            DGG.columns.push(new DataGridColumn("Umpire"));
        }
    ]]>
</mx:Script>

I want to add lines to my datagrid table how do such thing?

How to add the column to Adobe flex mxml or actionsctpt mx:DataGrid?

(You can place this code in a Flash or AIR application - it compiles without error, but will not add any columns =)

Change this:

public void SetDP (): void
{
DGG.dataProvider = MyAC
MyAC.addItem ({scheduledDate: "05/04/2007", homeTeam: "long hitters Valley", umpire: "Amanda Hugenkis"});
}
           
public void AddCol (): void
{
var dgc:DataGridColumn = new DataGridColumn ("Umpire");
var ca:Array = DGG.columns;
CA.push (DGC);
DGG.columns = ca;
}

Dany

Tags: Flex

Similar Questions

  • How to add the column to the compressed table

    Hi gurus,

    Can someone help me how to add a column to compressed tables


    Thanks in advance

    The only difference is if added column has a default value. In this case:

    SQL> create table tbl(id number,val varchar2(10))
      2  /
    
    Table created.
    
    SQL> insert into tbl
      2  select level,lpad('X',10,'X')
      3  from dual
      4  connect by level <= 100000
      5  /
    
    100000 rows created.
    
    SQL> select bytes
      2  from user_segments
      3  where segment_name = 'TBL'
      4  /
    
         BYTES
    ----------
       3145728
    
    SQL> alter table tbl move compress
      2  /
    
    Table altered.
    
    SQL> select bytes
      2  from user_segments
      3  where segment_name = 'TBL'
      4  /
    
         BYTES
    ----------
       2097152
    
    SQL> alter table tbl add name varchar2(5) default 'NONE'
      2  /
    alter table tbl add name varchar2(5) default 'NONE'
                        *
    ERROR at line 1:
    ORA-39726: unsupported add/drop column operation on compressed tables
    
    SQL> alter table tbl add name varchar2(5)
      2  /
    
    Table altered.
    
    SQL> update tbl set name = 'NONE'
      2  /
    
    100000 rows updated.
    
    SQL> commit
      2  /
    
    Commit complete.
    
    SQL> select bytes
      2  from user_segments
      3  where segment_name = 'TBL'
      4  /
    
         BYTES
    ----------
       7340032
    
    SQL> select compression from user_tables where table_name = 'TBL'
      2  /
    
    COMPRESS
    --------
    ENABLED
    
    SQL> alter table tbl move compress
      2  /
    
    Table altered.
    
    SQL> select bytes
      2  from user_segments
      3  where segment_name = 'TBL'
      4  /
    
         BYTES
    ----------
       2097152
    
    SQL> 
    

    SY.

  • Merge with VB Script ascii_diadem_9.1_or_later.zip .csv files: how to add the column/channel with filename

    Hello

    I use ascii_diadem_9.1_or_later.zip to merge the data from several .csv files.

    The problem is that I am so some weird futuristic timestamps in a channel

    which do not appear in the original .csv files:

    How to adjust the VB Script automatically adds a new channel to the a .csv resulting

    file with the original name of the .csv file for debugging purposes?

    Any help is greatly appreciated!

    Thanks, Katharina

    Hi Katharina,

    What happens when you drag your tiara BROWSER or Windows Explorer data files in the data portal?  See all date/time values in a table in VIEW of this channel?  The problem may be that you do not have a use but which properly load your data files.  The example is designed to show you how to concatenate several files of data together, but assumes that you could provide / have your own use.  If you use work already, then look for these lines to the top of the VBScript and substituting the name of your use "CSV".  If your files have a file extension different "*.csv", then you must also change the line "FileExt '.

    FileExt  = ' CSV files, *.» CSV »  ' « *. DAT; *. CSV '.
    Use = "CSV" ' "' or 'SpecificDataPluginName '.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • How to add the column to the table of QSqlDatabase if does not exist

    Hello

    I have an app World and want to update to include more features.

    To do this I need to add more columns in an existing database table created using QSqlDatabase, someone knows how to do this please?

    Tim

    Hi, you can use ALTER TABLE

    http://www.w3schools.com/SQL/sql_alter.asp

  • How to add the new column to a specific position

    Hello

    My table looks like Fallows.

    Select * from company

    PRODUCT_ID COMPANY_ID COMPANY_SHORT_NAME COMPANY_LONG_NAME
    11001An Inc.Long name A Inc.
    11002B Inc.Long name B Inc.
    11003C Inc.Long name C Inc.
    21004D Inc.Long name D Inc.
    21005E Inc.Long name E Inc.
    21006F Inc.Long name F Inc.

    My requirement is I would LIKE to add A NEW COLUMN AS COMPANY_LOCATION NEXT TO COMPANY_SHORT_NAME

    How to get there.


    I tried like Fallows alter company table add company_location varchar2 (100) after company_short_name;

    but this query shows the error

    ORA-01735: invalid option of ALTER TABLE

    If the query I've tried is correct?

    Give me your suggestions.

    Thanks in advance.

    As long as you're on 11 GR 2 or lower, it will not work.

    There is no Clause "AFTER"in the alter table do not add column."

    You have the chance to use dbms_redefinition (when no interruption of service is possible) or manually create a new table with the columns in the order you need and then migrate the data and then drop the original and rename a new.

    In case you are already on 12 c, you have a chance to add the column to the end and then make visible columns and invisible status in the right order. This way your column will get to the position that you want it to be.

    Kind regards

    Carsten

  • How to add the new column in existing table to our desired location?

    How to add the new column in existing table to our desired location?

    For example, I have to add the new column 'course' before the salary column in the emp table.

    I think the best way is to add the column at the end of the table and create a new view with the order of the columns...

    Another option...

    places the data into a temporary table and recreate the table with the correct order of the columns, and then insert data to the table from the temporary table

    Refer

    Add column (from table) in the desired position

    Example:

    CREATE TABLE temp_my_user LIKE)

    SELECT * FROM password);

    DROP TABLE password;

    (Password) CREATE TABLE

    userID NUMBER

    , first name VARCAHR2 (25)

    , middleInitial VARCHAR2 (1)

    (, name VARCHAR2 (25));

    INSERT INTO password (userID, firstName, lastName)

    (SELECT username

    first name

    lastName

    OF temp_my_user);

    DROP TABLE temp_user;

  • How to add the form designed in adobe acrobat pro live cycle Designer?

    How to add the form designed in adobe acrobat pro live cycle Designer?

    I want to add the form designed in adobe acrobat pro live cycle Designer. I saved the form designed in adobe live cycle designer in pdf format. But you can't change the same in Adobe Acrobat format. I would like to add a few fields and use the fields designed by Adobe Live cycle Designer.

    You can only modify this form in LiveCycle Designer. Forms Acrobat and LCD are not interchangeable.

  • How to add the blank page to existing Document in Adobe Dc

    How to add the blank page to existing Document in Adobe Dc Pro

    Hi thashrifs16749461,

    You can add a blank page using Adobe Acrobat DC by following the instructions below:-

    (1) open your PDF in Acrobat DC.

    (2) choose the form of option "Organize the Page" of the tool pane on the right as shown below in the screen shoot.

    (3) now, at the top, you will see all the tools to organize the page, click "Insert" & select 'White Page' in the drop down menu to insert blank pages.

    * Shortcut: If you are using a windows computer you can use the key "Shift + Ctrl + T" to insert blank pages.

    In case if you have any problem or have any questions please let us know. We will be happy to help you.

    Kind regards

    Nicos

  • How to add the Norwegian language to my ipa file in Adobe Flash Professional and AIR settings

    Hello

    How to add languages Norwegian to my file API in Adobe Flash Professional and the parameters of AIR?

    Norwegian users get my apps in English rather than Norwegian. Desperately need help!

    Cordially Ylva

    If it's a question about location, then this thread: Re: how to locate the name of the application into an air ios app? discusses explains how to add the Danish language, which is not localized to be default.

  • How to add the shape layer in Adobe after effects Cs2?

    How to add the shape layer in Adobe after effects Cs2?

    You upgrade. You're still too early for shape layers.

  • How to add the new column in the tabular layout editor in Oracle Forms

    Hello

    I need to add the new column to a datablock and display the newly added column in the form. What are the steps I need to follow.

    1. I chose the new column from the view to the datablock.
    2. Add the text element in the layout editor. But this position is not correct. It overlaps with another column. How to add the new column to the layout editor?

    Thank you
    HC

    In the layout editor, you can simply drag the fields so that they do not overlap.
    See http://www.youtube.com/watch?v=7emNa7THMLg

    Sandeep Gandhi

  • How to add the warning message when you use the function 'print' in Adobe LiveCycle Designer

    I'm trying to make the pdf document for my business that requires the addition of a warning message while everyone to use the function 'print' page...

    Does anyone know how to add the warning message about LiveCycle Designer

    Also my supervisor mentioned something using "nag" If that sounds at all

    Not in the XML code, in the case of script of pre-publication of the "print" key. If you don't have the script editor to the top on your version of designer, you can press ctrl + shift + F5 to bring it.

  • Button skin: how to add the button properties (more, low, high)

    Hi all

    I made a custom button 'skin' because I want my buttons to be images with NO box or border around it and it works well, but I don't know how to add the functionality of the button. ex. In "over" State buttons tend to turn on, and 'down' State they tend to become darker. Anyone know how to apply it to an image? Here is my code. Thank you guys!

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:fx s:SparkSkin ' http://ns.Adobe.com/MXML/2009 "
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" width = "64" height = "64" >

    < fx:Metadata >
    [HostComponent ("spark.components.Button")]
    < / fx:Metadata >

    < s: states >
    < name s: State = "over" / >
    < name s: State = "low" / >
    < name s: State = "mounted" / >
    < name s: State = "disabled" / >
    < / s: states >

    (< mx:Image source="@Embed(source='assets/images/lightbulb.png')" / > "
    < / s:SparkSkin >

    You can try something like this:

    
    http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/mx"
                 width="64" height="64">
    
        
            [HostComponent("spark.components.Button")]
         
    
        
            
            
            
            
            
    
        
    
    
    

    Peter

  • How to add the profile of lenses?

    How to add the profile of lenses?

    At the bottom of the link, you will find a link for the lens profile downloader. With this tool, you can download the profiles shared by other users.

    Work with lenses profiles in Adobe Photoshop, Lightroom and Camera Raw

  • Please tell me how to add the English language in photoshop?

    Hello! Please tell me How to add the English language in photoshop? I'm from Russia and acquired, respectively, also in Russia()

    Cloud of swap language http://helpx.adobe.com/creative-cloud/kb/change-installed-language.html

    or

    A product of Adobe for another language or version of trading platform for CS6

Maybe you are looking for