Using itemRenderer in Dynamic Grid

Hi,
I have grid with takes in a ArrayCollection as dataProvider.
Also the columns of the datagrid is defined from the action script.
At the mxml level, I have only the DataGrid tag. Now my data
contains some severity levels - critical, moderate and ok. Based on
what comes in, I want an itemRenderer which will print a different
image for each severity. i.e. if the value is critial, i want a red
color icon to be shown in the cell.
I wish to do this with actionscript itself. I am stuck at the
itemRenderer part. I checked out the examples. All of them work
with mxml tags for itemRenderer using images. I want the renderer
to be through actionscript. Has anyone done this? Can anybody help
me with this?
Cheers,
Uday

Hi Uday,
Were you ever able to accomplish this? I'm looking to do
something almost exactly the same, where I have data that provides
one of two values, and I want to translate those values into one of
two icons.
If you were able to do this, I'd appreciate any explanatory
help. Or if someone else out there has an answer to his original
post, I'm sure it would be appreciated by more than just myself.
Thanks,
Josh

Similar Messages

  • Creating a dynamic grid using actionscript

    Hello all:
    I am working on a Flash project which requires that the user
    input 2 values. These two values will be used as height and width
    to generate a dynamic grid. I am new to actionscript and am
    struggling with how to create the 2 input fields and pass the
    values to actionscript by an event such as the user pressing
    return. The code below will create the grid correctly based upon
    the hardcoded variable values hightlighted, but I need the user to
    enter the values and press return to generate the grid.
    Can anyone suggest the actionscript required to capture the 2
    values, send them to actionscript with an event such as pressing
    return and then have AS generate the grid width and height based
    upon the user input. The i (10) and j (10) values in line 4 and 5
    are the values that I need to have the user input to generate the
    grid.
    Any help will be most appreciated!
    initX = 0;
    initY = 0;
    counter = 0;
    for (var i = 1; i<=10; i++) {
    for (var j = 1; j<=10; j++) {
    counter++;
    grid_container.attachMovie("cellMC", "cell"+counter,
    counter);
    grid_container["cell"+counter]._x = initX;
    grid_container["cell"+counter]._y = initY;
    grid_container["cell"+counter].onRelease = function() {
    cellName.text = this._name;
    initX += 30;
    initY += 30;
    initX = 0;

    Thanks for the quick reponse kglad. I will give it a
    go.

  • Shape retrieval; finding all polygons in a huge grid;dynamic grid

    Hi.
    1) Is it possible to find (fast) all shapes (eg. polygons) in huge 2D grid? and if yes how can I do it? or do I have to cluster (or sort) my shapes first to make the search fast?
    2)Is it possible to define a dynamic Grid
    not like
    SDO_DIM_ARRAY( -- 20X20 grid
    SDO_DIM_ELEMENT('X', 0, 20, 0.005),
    SDO_DIM_ELEMENT('Y', 0, 20, 0.005)
    but sthing like
    SDO_DIM_ARRAY( SDO_DIM_ELEMENT('X', 0, infinit, 0.05), SDO_DIM_ELEMENT('Y', 0, infinit, 0.05)
    thx

    no i am searching for something I haven't found neither in Oracle Spatial nor in Oracle spatial topology and network... documentation.
    Here is what I have:
    CREATE TABLE graphs ( id NUMBER PRIMARY KEY, name VARCHAR2(32), shape SDO_GEOMETRY, geom_id NUMBER);
    INSERT INTO Graphs VALUES( 1, 'OBJECT 1', SDO_GEOMETRY(
    2006, -- Multline string, 2 dimensions (X,Y),
    NULL, NULL,
    SDO_ELEM_INFO_ARRAY(1,1,8), SDO_ORDINATE_ARRAY(280,275, 208,168, 208,381, 280,275, 459,276, 90,168, 90,381)), 14);
    INSERT INTO Graphs VALUES(2, 'OBJECT 2',SDO_GEOMETRY(2006,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1,6), SDO_ORDINATE_ARRAY(15,17,10,16, 20,38, 28,27, 459,276, 90,168)), 15);
    INSERT INTO user_sdo_geom_metadata(TABLE_NAME,COLUMN_NAME,DIMINFO,SRID)VALUES('Graphs','shape',SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', 0, 600, 0.05),SDO_DIM_ELEMENT('Y', 0, 600,0.05)),NULL);
    CREATE INDEX Graphs_spatial_idx ON Graphs(shape) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    If I would like to know if another Multiline- object (geometry2) with the coordinates 280,275, 208,168, 208,381 is in "object 1" anywhere in my table I can use something like SDO_COVERS(geometry1, geometry2);
    AND NOW here is my problem. Supposed I don 't have the coordinates of geometry2 but an equal Multiline (equal in considering the shape for example like 180,175, 108,68, 108,281). Is there a way to search over all my geometrys in my table if geometry2 COVERS IN ANY WAY (any direction) the geometry in the table. I could code the problem in java but I would like to know if Oracle Spatial or Topology network has functions that support subgraph search.

  • Use ItemRenderer for particular rows in ADG

    I noticed that the itemRenderer is applied column-wise. I was wondering if it is possible to use ItemRenderer only for a few rows in the ADG. I want the itemRenderer to be applied to parent nodes and all their children. But if a row doesn't have children, I don't want it to be renderer by an ItemRenderer. Any idea of how to achieve that? Thanks.

    Yes.  You'll need to use the ADG's rendererProviders property.  It's an array of AdvancedDataGridRendererProviders (http://livedocs.adobe.com/flex/3/langref/mx/controls/advancedDataGridClasses/AdvancedDataG ridRendererProvider.html).  The documentation is pretty good, but basically you set a bunch of properties on each ADGRP, and the grid figures out from those properties what renderers to use on the fly.  Its exactly what you need for different renderers at different levels in a hierarchy.

  • Help Creating a Dynamic Grid?

    I have some experience in flash and actionscript, but not much beyond the classroom in a book tutorials, etc.
    I am working on an idea and just need a little help figuring out where to begin.
    I would like to create a simple 2D interactive grid.  The user should be able to increase and decrease the number of axis (both X and Y simultaneously) that compose the grid, and also the scale of the grid itself (Zoom in and Out).
    If this goes well enough, I would like to be able to plot graphical content on the grid that visually changes as the grid itself changes.  They should, in some way, be linked to one another and correspondingly affected by the same two parameters.  This, however, would be a second step.  I am more concerned with the base grid model at this point.
    ANY help would be very much appreciated!

    It is not clear from your post what exactly you need to do. Perhaps some visual (simple image) will help us understand your vision and use cases.
    Meanwhile, I have a post on my blog about how to compose dynamic grid:
    http://flashascript.wordpress.com/2010/12/25/arranging-objects-into-2d-dynamic-grid-with-a ctionscript-3/
    The same principals can be applied to drawing other grid related visuals.

  • How to disable the inputfield using radio button dynamically in module pool

    How to disable the inputfield on the screen using radio button dynamically in module pool.
    Please suggest .
            Thanks.
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:20 PM

    I got it thank you.
    LOOP AT SCREEN.
        if  screen-GROUP1 = 'LA1'.
           If RADIO1 = 'X'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
         ELSEIF RADIO2 = 'X'.
           screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:51 PM

  • Problem in using table name dynamically in PL/SQL

    I tried to create a procedure to use table name dynamically and got the following error. Anything wrong with my procedure?
    NFADV>declare
      2   cnt number;
      3   cursor cur is select table_name from user_tables where table_name in ('EMP','DEPT');
      4  begin
      5   for c1 in cur
      6   loop
      7    execute immediate select count(*) into cnt from c1.table_name;
      8      dbms_output.put_line('Count is : '||cnt);
      9   end loop;
    10  end;
    11  /
    declare
    ERROR at line 1:
    ORA-06550: line 7, column 21:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + case mod new not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternatively-quo
    ORA-06550: line 8, column 5:
    PLS-00103: Encountered the symbol "DBMS_OUTPUT"
    ORA-06550: line 8, column 45:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( , * % & - + / at mod remainder rem <an identifier>
    <a double-quoted delimited-identifier> <an exponent (**)> as
    from into || multiset bulkThanks and Regards
    Kaustubh

    Hi,
    The wrong part is in execute immediate, it should be as follows:
    execute immediate ('select count(*) from '|| c1.table_name)
    into cnt
    (not tested)
    Regards
    AK

  • How to use table name dynamically in report  procedure

    Hello every body
    I want to use table name dynamically means at runtime i want to pass table name.
    I can do this by lexical parameter in main query.
    But my problem is that i want to crate new format trigger or new function that use 1 cursor in which that lexical parameter : table name is used.
    so how to do that?
    i can not use that lexical parameter it is giving error.
    please help me how to do that.

    Call a database function which you pass the lexical parameter. Then in the database function you use dynamic sql or the execute immediate option to build the SQL string.
    Return the information from this function to build your business logic on in your format trigger.
    Marcos

  • Can I make a Data Guard configuration using EM console without Grid Control

    Can I make a Data Guard configuration using EM console without Grid Console?
    Can I download Grid Console software from Oracle website without cost?

    Assuming this is for 10g,
    You could use Oracle® Data Guard Broker
    Even you can download Grid Control software for free from Oracle site, you can't legally use it without license.

  • Does anyone else use a PDF form to extract data they can then use to populate Dynamic Content in Ill

    Does anyone else use a PDF form to extract data they can then use to populate Dynamic Content in Illustrator?

    You can connect the form to the DB using anODBC connection. This functionality comes as part of Acrobat but the form must be Reader Extended by the full LiveCycle Server version of Reader Extension to allow this in Reader. In your case, if your system is the only on ethat will interact with the DB then this might be a viable solution (but you woudl have to use Acrobat). This solution woudl involve create an ODBC connection in your system then configuring the form to make use of that connection.
    Does that make sense?
    Paul

  • Using TVARVC to Dynamically Set the Payroll Period in Standard Reports

    Hi,
    I am trying to define the selection screen parameters for the Pay Scale Reclassification (RPIPSR00) program such that the payroll period chosen is always +1 of the current period (i.e. the next payroll period).
    I understand that I can use TVARVC to dynamically determine the field value of a selection screen variant.  The question is after I have created a variable in the table, how do I go about ensuring that the program uses the next payroll period?
    Regards,
    Augustine

    Try reading the help first: http://help.sap.com/saphelp_nw04s/helpdata/en/c0/980398e58611d194cc00a0c94260a5/content.htm
    You have to update TVARVC with the desired value - either via a batch program or manually.
    matt

  • Dynamic Grid Layout Dreamweaver CS6

    The Dynamic Grid Layout is the main reason for purchase new version of Dreamweaver .
    Dynamic Grid Layout in Dreamweaver CS6 does not work nice, columns are not modify with the mouse, jumps back to the old postition. On You Tube it all looks so very easily, but in practice is all very sloppy about ...
    Ask the forum, Do I have to drag a button to hold...
    If I adjust the width on the left side of the div, I left a red band that set ....
    Where is a make proper manual to find ....

    Thanks for our suggestions, i keep trying, but Easy NO…..
    Geert
    Van: Nancy O. [email protected]
    Verzonden: donderdag 10 mei 2012 17:11
    Aan: Geertskigek
    Onderwerp: Dynamic Grid Layout Dreamweaver CS6
    Re: Dynamic Grid Layout Dreamweaver CS6
    created by Nancy O. <http://forums.adobe.com/people/Nancy+O.>  in Dreamweaver - View the full discussion <http://forums.adobe.com/message/4394107#4394107

  • Dynamic Grid layout

    hi experts..
    I am facing problem with Dynamic grid layout .
    sample code ,and valuable inputs are well appreciated.
    Thanks in advance,
    Kranthi

    Hello Kranthi,
    Could you please elaborate what are you trying to achieve.
    Any UI element created dynamically would include the layout property as well.
    Regards
    Anurag Chopra

  • Example of using ActionScript to create Grid, GridRow, and Grid Item?

    Does anyone know where I can find a complete example of using
    ActionScript to create Grid, GridRow, and Grid Item?
    I got an error when trying to add a child to the GridRow.
    Flex 2 said this method (addChild) is not available to
    GridRow.

    This thread should help:
    http://www.actionscript.org/forums/showthread.php3?t=167806
    matt horn
    flex docs

  • Using Query prompt dynamically?

    Hi All,
    I want to use query prompt dynamically. I.e i want to pass value in excel cell to prompt and refresh the query, when refresh button is pressed.
    I am using Version 6.0.7.0. and Build 14.0.7.1147.
    Is the feature required for me is fixed in the version i am using.
    Please let me know as soon as possible, I am in a very tough situation
    Regards
    Nithesh M R

    Hi,
    I have 5 combo boxes for which i am passing data from Excel.
    Then i am storing the selected values of 5 combo boxes in 5 different cells.
    Then i have given these values stored in excels cells as the "list of values" for my 5 different prompts by mapping it to these cells and then i want to refresh that query.
    For this i have provided the "Query refresh" button to refresh that particular query.
    What i want is, when a refresh button is pressed the values stored in cell should go as an input to prompts and corresponding filtered data should be provided by that query. Which i am displaying in dashboard.
    But this is not happening for me, when i press refresh button the data is not passing as an input prompt. I am getting data obtained when i built that query i.e old refresh data
    Please let me know all steps and also any setting, properties to be set for achieving this.
    Also let me know whether its possible in my Version 6.0.7.0. and Build 14.0.7.1147.
    Regards
    Nithesh M R

Maybe you are looking for