Using the name of dynamic column in datagrid selectedItems

Hello

I have a datagrid that is loaded with 2 columns. AllowMultiSelect is enabled.

Based on the values selected at runtime, I get the correspondent selected the name of the column and its values and displays it on the screen of the HTML.

GRP is datagrid

dgrcl is a data grid column

selflds is a table that has values 0,1,2,3

selflds [0] = name, selflds [1] = age

for (var l:int = 0; < grp.columnCount; l ++)

{

dgrcl = grp.columns [l];

selflds [l] = dgrcl.dataField;

}

srhVals will have a single value selected in one point any

get the corresponding name of the selected column and its value

var srhVals:String;

srhVals = String(grp.selectedItem[selflds[1]]);

I'm trying to make the selection above instead in .selectedItems something like below. By doing that, I'll get all selected items, but not a single. If I try under syntax, I get error. Anyone have any ideas on how to make.

srhVals = String(grp.selectedItems.selflds[1]);

Hello

I got my mistake, there should be no point after selectedItems operator;

I found a solution - it goes like this:

for (var g:int = 0; g<>

{

srhVals = srhVals + String(grp.selectedItems[g][selflds[1]]);

}

If the whole scenario is like this:

DataGrid:

Name age

a               20

b               30

c               40

d               50

I select b, d in the user interface. At runtime, I get the selecteditem as 'Name' column name programmatically, loops through the selecteditems and store the value in srhVals b, d.

b, d will finally be shown in the user interface.

Tags: Flex

Similar Questions

  • How to find a table, using the name of the column in the database schema

    Dear all,

    Please help me on

    using the name of the column, how to find a table name in the database schema.

    Thanks in advance

    Hello

    You can query the data dictionary views all_tab_columns and user_tab_columns.
    For example, to find the tables in the scott schema have called deptno columns:

    SELECT  table_name
    FROM    all_tab_columns
    WHERE   owner           = 'SCOTT'
    AND     column_name     = 'DEPTNO';
    

    Remember that anything inside quotes is case-sensitive.

    The all_tab_columns view has one row for each column in each table (or view) that you have the privileges to use.
    The user_tab_columns view is a subset of all_tab_columns, containing only your own tables (and views).

  • Use the name of the value of the Variable?

    Is it possible to use the name of a variable to the value for loading data?

    That means is, if I have a variable called "var1" and I charge "var1" to an XML file then "var1" value is "XYZ", is it possible to use the value "XYZ" to load data to a dynamic textbox call "XYZ"?

    var1 = "XYZ".
    (XYZ is a dynamic text on the stage box and I need to load XYZ with incoming data)
    Example: XYZ = "text that I ever have."
    (but XYZ is really the value of 'var1')

    Thanks - Gary

    Is it possible to use the name of a variable to the value for loading data?

    That means is, if I have a variable called "var1" and I charge "var1" to an XML file then "var1" value is "XYZ", is it possible to use the value "XYZ" to load data to a dynamic textbox call "XYZ"?

    var1 = "XYZ".
    (XYZ is a dynamic text on the stage box and I need to load XYZ with incoming data)
    Example: XYZ = "text that I ever have."
    (but XYZ is really the value of 'var1')

    Thanks - Gary

  • Can I have the Profile Manager uses the name of the device used when the placement of placeholders?

    Can I have the Profile Manager uses the name of the device used when the placement of placeholders? Currently, all get renamed 'iPad' when the device through DEP configuration.

    No, but

    I was putting new devices in groups of temporary devices and renaming in bulk, once they are configured for the user, by using user variables / unit...

    The other annoying problem would be the user modifies the device name when they connect it iTunes...

    • the %destinataire% email - address email (the EMailAddress attribute)
    • first_name % - first name (FirstName attribute)
    • full_name % - full name (attribute RealName)
    • % of guid guid (GeneratedID attribute)
    • last_name % - last name (the LastName attribute)
    • the title of the post (the JobTitle attribute) %

    -% mobile_phone % the number of mobile (laptop attribute)

    • short_name % name run (the RecordName, generally the name of the account attribute)

    The variables of the unit are:

    • % BuildVersion % - full OS version on the device
    • ICCID % - ICCID (from the SIM card)
    • IMEI % - IMEI (International Mobile Equipment Identity)
    • OSVersion % - common version number of the operating system of the device
    • ProductName % - name of the product
    • SerialNumber % - serial number
    • % WIFIMAC %-MAC address of the WiFi interface
  • How can I get Mozilla to use the name of the page for the name of the real instead of the URL bookmark when I bookmark a page

    I just noticed that (in comparison to Internet Explorer): in IE, when you preferred a Web page, it uses the actual name of the Web page (for example, for this page, it would be "Ask a Question Firefox Help" as the name of the bookmark), but in Mozilla, it uses the URL as the name of the bookmark. I was wondering if it was possible to change my Mozilla settings so that it uses the name of the Web page as the bookmark name instead of the URL? I hope that everyone understands what I am getting? If anyone can help me, I would really appreciate it. Thank you.

    Firefox uses the tag title for the name of the newly saved bookmark.

    When I bookmark on this forum page I get this for the 'name' of the bookmark.

    How can I get Mozilla to use the name of the page for the name of the real instead of the URL bookmark when I bookmark a page | Firefox Support Forum | Firefox help

  • Can access the shared folder by using the name of the server, but is unable to use the intellectual property

    Hi, I need help with a very strange problem.

    I have a Server 2003 domain controller to PC and all the domain user can access any shared folder of the server using IP address or FULL domain name.

    So I joined a R2 of 2012 new server to the domain as a workstation normal and not as a new domain on the network controller, and the problem is that one cannot access a shared folder on the new server by using the IP, but can be accessed using the name of the computer.

    My Admin user can access the folder using the IP address or the name comp. on any work, but the user of my AD position may not use intellectual property.

    I can using Ping IP or name of the computer for every user of AD.

    Please check the attached images.

    When I try to access it using IP, it gives me the following error:

    \\192.168.0.2 is not accessible. You might not have permission to use this network resourse. Contact the administrator of this server to fing out if you have access permissions.

    Currently, there are no available connection server to process the logon request.

    Hello

    You may need to ask the question on the TechNet Forums:

    https://social.technet.Microsoft.com/forums/WindowsServer/en-us/home

    Kind regards

  • How to create a list of button by using the names of a table

    Hi, I want to create an application that displays detailed information about something. for example, as the profile of the users. my application will read an xml response from the server that contains the list of the names of the users. How to create a list of buttons using the names and then each button that displays the name that can be pressed and displays detailed information about the name? I think that it is similar to the BBM app that displays a contact list of the user. Thank you very much

    Create a ButtonField as:

    ButtonField [] users_buttons = new ButtonField [number of users];

    Initialize the uasing dem:

    for (int i = 0; i)<>

    users_buttons [i] = new ButtonField ("user", Field.FIELD_HCENTER |) ButtonField.CONSUME_CLICK);

    Make dem clickable setchangeListener method of buttonField and Ooveride Navigation click to make a few operatoin by clicking on the specific button!

  • How to get the offset by using the name-capture-group in Java 7?

    Hi all

    Java 7 provides the capturing group named in the Regex Matcher class, but it lacks several methods that returns the offset associated with the named capturing group. At least, the following two methods:

    (1) int end (String name);
    Returns the offset after the last character in the subsequence captured by the named capturing group during the previous match operation.
    (2) int start (String name);
    Returns the starting index of the subsequence captured by the named capturing group during the previous match operation.

    Given that these two methods do not exist in the Java 7 courses, the second line of printing in the following example does not work. Someone suggested to make it work?

    String matching = "aaabbbaaa";
    String pattern = "(?) (< AString > a +) b * a * "; "AString" is a named capturing group
    Patten pattern = Pattern.compile (pattern);
    Matcher Matcher = patten.matcher (match);
    int groupID = 1; In this example, we know that the "AString" a group ID = 1, but most of the time, we do not know the ID of Group of the named capture group.

    If (matcher.matches ()) {}

    When you know the ID of the group, it is easy to use.
    System.out.println ("found the text-" "+ matcher.group (groupID) +" \"nerd index" +)
    Matcher.Start (GroupId) + "and end at index" + matcher.end (groupID));

    The following line does not work
    System.out.println ("found the text-" "+ matcher.group ("AString") +" \"nerd index" +)
    Matcher.Start("aString") + "and end at index" + matcher.end ("AString"));

    }

    Thank you very much.

    Tao

    taoqian wrote: anyone got the suggestion to make it work?

    I'm at a loss as to what you expect members of this forum to do. The Matcher class does not have the two methods you want and you already have a workaround that you can use the id of group digital. Now you could trigger a bug report, suggesting a change, but at best, this is likely to take years to implement.

    Although I don't really see no advantage and seems to go against the spirit of the use of group names, if you absolutely need to use the name of a group, then you might create a mapping between a group and its index name.

  • Rename the layer by using the name of the supplied object

    I'm trying to draw a map of the world that includes the provinces and provinces (counties).  I'll be it animation in AE. AE sees that the upper layers is essential which is the name of the top layer of the correct province. All provinces are unfortunately not layers. They are objects. I can use the "Release to layers" command to get all items nested in layers of high level. But the layers of high level generic names (Layer 1, Layer2, Layer 3). Objects nested within these layers have the correct name.

    Y at - it a script that will rename the top-level layer using the name given to the object nested within this layer? If this isn't the case, could sombody would be willing to help create a.

    Here is a link to one of the files: world_all_provinces_Senegal divisions. Level 1_area.zip

    layer_naming_problem.png

    Opps, I'm too slow.

    I could not open your file to test it, but during a quick test, it seems to work also.

    var doc = app.activeDocument;
    var n, p;
    for (var i = 0, l = doc.pageItems.length; i < l; i++) {
        p = doc.pageItems[i];
        n = p.name;
        p.parent.name = n;
    }
    

    But again maybe it is specific (not tested with your file or other) and so will not work in your case or other. Worth I guess that if.

  • Using #WORKSPACE_IMAGES # with the names of dynamic list of Image, not to hardcode

    I hope someone can help me with this request.

    I am developing an Apex application but I am learning as I go along by examples of Google search and read the tutorials, etc.  I am trying to create a slideshow based on a dynamic list of Image names. First, I created an apex_collection in a header containing the names of the image process, I need (view/column APEX_COLLECTIONS. C001) I then created a Page called P81_IMAGE_NAME element. I'm trying to loop through the collection and display the pictures in a slide show.   I have a HTML Page with the following code in the Source of the region (found the code in an example online)... Please can someone tell me where I can add the following PL/SQL code so that #WORKSPACE_IMAGES # nom_image may contain the names of images dynamically recoveries rather then hard-coded image names as in the < div Section of the Source region - Code I want to add somewhere, don't know where it add or even if it will work

    Declare cursor c1 is

    Select c001

    of apex_collections

    where collection_name = "CO_IMAGES";

    Start

    A1 to c1 loop

    : P81_IMAGE_NAME: = c1. C001;

    < img src = "#WORKSPACE_IMAGES & P81_IMAGE_NAME" alt = "Slideshow Image" / >

    end loop;

    end;

    -End

    -The code which displays images, I found (Harcoded in the < div section)

    < script type = "text/javascript" >

    function slideSwitch() {}

    var $active = $("#slideshow IMG.active");

    If ($active.length == 0) $active = $("#slideshow IMG:last");

    This allows to take images in their order of appearance in the tag

    var $next = $active.next () .length? $active.next)

    : $('#slideshow IMG:first');

    Uncomment the 3 lines below to shoot images in random order

    var $sibs = $active.siblings ();

    var rndNum = Math.floor (Math.random () * $sibs.length);

    var $next = $($sibs [rndNum]);

    $active.addClass('last-active');

    $next.css ({opacity: 0.0})

    .addClass ('active')

    . Animate ({opacity: 1.0}, 3000, function() {})

    $active.removeClass ('active last active');

    });

    }

    {$(function()}

    setInterval ('slideSwitch()', 3000);

    });

    < /script >

    < style type = "text/css" >

    / * the value width and height to match your images * /.

    {#slideshow}

    position: relative;

    height: 400px;

    }

    #slideshow IMG {}

    position: absolute;

    top: 0;

    Left: 0;

    z index: 8;

    opacity: 0.0;

    }

    {IMG.active #slideshow

    z-index: 10;

    opacity: 1.0;

    }

    {IMG.last - active #slideshow

    z index: 9;

    }

    < / style >

    < div id = "slideshow" >

    < img src = "" #WORKSPACE_IMAGES #Logo.png "alt =" slideshow Image 2 "/ >" "

    < img src = "" #WORKSPACE_IMAGES #Logo1.png "alt =" slideshow Image 1 "/ >" "

    < img src = "' #WORKSPACE_IMAGES #2_Burg - 1.png" alt = "Slideshow Image 2" / > "

    < img src = "" #WORKSPACE_IMAGES #Car11.jpg "alt =" slideshow Image 3 "/ >" "

    < img src = "" #WORKSPACE_IMAGES #Screen1.png "alt =" slideshow Image 4 "/ >" "

    < / div >

    < / div >

    user8016921 wrote:

    Please update your profile of the forum with a recognizable user name: Video tutorial how to change username available

    Always include the information described in these guidelines when you post a question: How to get the answers from the forum

    I am developing an Apex application but I am learning as I go along by examples of Google search and read the tutorials, etc.  I am trying to create a slideshow based on a dynamic list of Image names. First, I created an apex_collection in a header containing the names of the image process, I need (view/column APEX_COLLECTIONS. C001) I then created a Page called P81_IMAGE_NAME element. I'm trying to loop through the collection and display the pictures in a slide show.  I have a HTML Page with the following code in the Source of the region (found the code in an example online)... Please can someone tell me where I can add the following PL/SQL code so that #WORKSPACE_IMAGES # nom_image may contain the names of images dynamically recoveries rather then hard-coded image names as in the

    Depends on the number of images. How are they involved?

    With a small number (e.g. 10-20), you can simply use a page element to register the handset img reference items and she as a substitution string in the region existing HTML. For more information, it would be preferable to use a report.

    On the approach of page element:

    1. create the point P81_IMAGES of the page as an element of the display only. The value of the Condition Never element so it is not included in the rendered page and the security attribute point escape special characters No.

    2. create a page process before header (sequenced to run once the collection created if that is done at this point in the process):

    begin
    
      :p81_images := null;
    
      for img in (
        select c001 src
        from apex_collections
        where collection_name = 'CO_IMAGES')
      loop
        :p81_images := :p81_images || 'Slideshow Image '
      end loop;
    
    end;
    

    3 refer to the value of the element in the HTML source of the region

    
    
    
    
    
    &P81_IMAGES.
  • How to select data using the same remote database column name 3

    Hello


    Can anyone help me on how to get the data with the same remote database column names 3 and a unique nickname.

    E.g.

    SELECT *.
    B.SID, b.status, SUM (b.qty) qantity MAX (b.) date_as_of
    Of
    * ((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) has, *)
    (* (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) b). *
    WHERE b.dept = 'finance '.
    AND a.position = "admin".
    AND a.latest = 'Y' AND (b.status <>"MLT") AND b.qty > 0;
    B.SID GROUP, b.status;

    NOTE: the instructions "BOLD" is just an example of what I want to do but I always get an error beacause of ambiguous column.

    Thanks to advnce. :)

    Published by: user12994685 on 4 January 2011 21:42

    user12994685 wrote:

    Can anyone help me on how to get the data with the same remote database column names 3 and a unique nickname.

    Not valid. This makes no sense and breaks all the rules of scope-resolution. And if it is in a single database, or uses tables in databases, is not relevant.

    Each object must be particularly well identified. If you cannot do this:

    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a
    

    3 objects cannot share the same alias. Example:

    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
                       *
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    

    You need to combine objects - by using a join union or similar. He will have to be done as follows:

    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
           *
    ERROR at line 1:
    ORA-00918: column ambiguously defined
    

    However, we need to have unique column in a projection of SQL names - so the join of the need to project a unique set of columns. So:

    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    
    DUM DUM
    --- ---
    X   X
    
    SQL> 
    

    I suggest that you look carefully at what opportunities are and how it applies in SQL - and ignore if the referenced objects are local or remote, because it has no effect on the basic principles of scope-resolution.

  • Adding dynamic columns to datagrid at the beginning of the datagrid

    Hello friends,

    There is a datagrid that is static. and I m adding a dynamic column. It is added at the end of the static data grid

    but I want to add dynamic at the begning of the datagrid column can someone help me on this.

    Thanking you,

    Kind regards

    Gallot

    datagridfeeamount.dataProvider = new ArrayCollection (event.result.rows.row) collection;

    the word 'new', after that the = was supposed to be red and larger

  • How to create a dynamic RTF report that creates dynamic columns based on the selection of dynamic columns in a table?

    Hi all

    Suppose I have table, whose structure changes frequently on a daily basis.

    For example. / / desc my_table gives you after the name of the column the day 1

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone


    Day 2, two other columns are added, viz, address and salary.

    SQL > my_table DESC;

    Output

    Name

    Age

    Phone

    Address

    Salary


    Now, I want to create a Dynnamic RTF report which made extracting data from all columns from my_table daily. For this, I have defined a simultaneous program with XML output type and include in annex a data/definition of data model that takes XML as input and gives the final result of the conc program in EXCEL layout. I am able to do that for a constant number of columns, but don't know how to do it when the number of columns to display dynamically changes.

    For 1 day my XML file should be like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 1, EXCEL output RTF model should be like this.
    Name age phone

    Swapnill 23 12345

    For 2 days my XML file should be like this. With 2 new columns selected in the SELECT clause.

    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    
    

    And my day 2, exit EXCEL model RTF should be like this.
    Name address telephone pay

    23 12345 Madrid 100000 Swapnill

    Now, I don't know below things.

    • Make the dynamic XML as we did in the day 1 there are 3 columns in the SELECT statement and the day 2, 5 columns. I want to create a dynamic XML which must not be changed if the new columns are added into my_table. I don't know how to create this query and also create their corresponding items below.
    • Make the RTF model dyanamic as day 1 there are 3 exit EXCEL columns and the day 2, 5 columns. I want to create a dynamic RTF model that would display all the columns selected in XML dynamic. I don't know how the RTF will create new XML tags and how it will know where to place them in the report. Means, I can create model RTF day 1, by loading the XML data for 3 columns and place 3 tags XML in the model. But how he will create and place the tags for the new columns the day 2?

    Hope so, you got my requirement, it's difficult. Please let me know how I can implement the necessary solution using the RTF dynamically without any manual intervention.

    Kind regards

    Patricia K.

    Post edited by: SwapnilK

    Hi guys,.

    I was able to solve above the requirement.

    I created a procedure that would create & update (attached to the data definition) XML file dynamically for each race. This dynamic XML contains the SQL statement for the data query that is built dynamically. I am updating this XML file using XDOLoader utility to the definition of data. Then run my program customized to generate the excel output.

    Exit excel retrieves correct number of columns dynamically (3 on Day1 and Day2 5), with corresponding data records.

    Kind regards

    Patricia K.

  • Use the name of the db link programmatically in a PL/SQL block

    Hello

    I have a requirement to be able to create a database procedure that references the same db tables different names of links (i.e. a generic procedure). The procedure would be passed as parameter the name of the db link and then later in the code in the block table is queried by using the provided parameter of dblink name. I'm working on the best way to achieve this and I was wondering if anyone else has had to do the same? I'm open to suggestions here.
    Here is an example of pseudo code:

    procedure query_table (p_dblink_name varchar2) is

    Start

    Select count (*) in tableABC@p_dblink_name;

    end;
    /

    Obviously, the code above is not correct syntax, but that's actually what I'm trying to achieve. Any ideas?

    Kind regards
    Leigh.

    You must use dynamic SQL statements

    procedure query_table (p_dblink_name varchar2)
    is
      l_cnt pls_integer;
    begin
      execute immediate 'select count(*) from tableABC@' || p_dblink_name
         into l_cnt;
    end;
    

    Justin

  • How to get the name constraintlist and column in a table?

    Hello


    can someone please tell me how to get the type of constraint, and it is imposed on the names of columns in a table.




    Thank you
    Nico

    Hello

    Use the two tables:

    select * from all_constraints
    
    select * from ALL_CONS_COLUMNS
    

    Sorry SY, you were faster than me...

    Published by: user11268895 on August 19, 2010 13:27

  • Maybe you are looking for

    • Machine-bundled licenses are installable on more than one machine?

      I have a bulk copy of the numbers (and the rest of the iWork applications) that I got with a new Macbook. Is it possible to install it on my iMac as well, or do I have to buy another copy? Now that I'm used to the numbers, I need to edit these files

    • Qosmio F10-136 - cannot install all drivers

      I have a Qosmio F10-136. I recently formatted hard drive. Because I had lost the recovery disc, I had to use another copy of Windows. I downloaded the drivers available on the Toshiba site, but I did not install all the drivers except the wireless LA

    • Cannot install KB979906

      My computer keeps trying to install KB979906. It will not install, it will keep telling me to restart to activate, I do but then he tries to reboot again.  Help!

    • Java 7updated

      I can't install java 7 set to day in my pc, windows xp 32-bit sp3. Please suggest. I try manually install by downloading it from the oracle java.

    • Is it possible to save the shapes drawn with the pen tool?

      Is it possible to save the shapes drawn with the pen for reminder tool later?As for example save selections in Photoshop?I use Indesign CS2