Filter Second Datagrid from First Datagrid

I'm trying to filter a 2nd datagrid when you click a row from
the 1st datagrid. I wrote some ASP code that takes a recordset and
converts it to XML. The XML is working fine when doing this.
The application is a list of trainers and superusers at a
hospital. The list of people is the first datagrid and the
curriculums they can teach is the second. Each trainer can have 1
or more curriculums that they can teach.
The first datagrid (the one I want to click on to filter the
second datagrid) is called "Trainers" and the field I want to use
as the key to pass to the second is "Trainer_ID." The second
datagrid is called "Roles" and shares a column called "Trainer_ID"
that identifies a trainer and a curriculum (role) they can teach.
I was hoping someone could help me by posting an example of
the code I could use to do this filter? I'm new to Flex, but
experienced with ASP and ASP.NET. Love what I'm doing with flex
though. Here is a link to the application itself:
Test
Link for Application
Here is my code so far:

Basically, what Amy's example shows, is using the
filterFunction property of the ArrayCollection to filter the rows.
filterFunction takes a reference of a function, that's called for
each row in the ArrayCollection and it returns a boolean deciding
whether you want to keep this row or not.
once filter has been applied, you need to call refrehs()
function to see the changes.
http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items-in-a-datagrid-in- flex/
http://blog.flexexamples.com/2008/09/12/using-a-slider-to-filter-items-in-a-datagrid-contr ol-in-flex/
ATTA

Similar Messages

  • Calling second servlet from first servlet

    I need to call a servlet from a servlet.
    I need to call the specific doGet method of servlet 2 from
    servlet 1. I also need to return the control to servlet 1
    after servlet 2 done its job.
    I did it now by creating a new instance of servlet 2 from servlet1
    and then call the doGet method like
    in servlet1 : Servlet2 serv2 = new Servlet2();
    I really don't like this idea of creating a new instance in servlet 1.
    Any thoughts/idea/comments would be appreciated.

    request.getRequestDispatcher("path/to/otherServlet").forward(request, response);
    or
    request.getRequestDispatcher("path/to/otherServlet").include(request, response);will do what you are looking for. See the API documentation on details. Basically the difference is that forward gives FULL control (including that of the headers) to the invoked servlet while include mearly "includes" the results.

  • Open a second window from the first one

    Hi,
    The problem of my application is loosing control when I open the second window, so I know that the problem is the run of the sub VI but I don't find an other possibility to open a second window from the first one knowing that the first sends its vales to the second one. In an other way I want to open two windows simutaneously.
    NB: I attached  a simple verssion of my application.
    Can someone help me please.
    Attachments:
    The main VI.vi ‏21 KB
    The su b VI.vi ‏28 KB

    Hi Basile,
    why do you open a new thread again? Didn't the older one provide a solution?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I can copy and paste from mozilla to word in second attempt only first attempt fails and paste a zero sized dot on the word document

    i can copy and paste from Mozilla to word in second attempt only first attempt fails and paste a zero sized dot on the word document.more ever i can not drag fevicon from address bar to my desktop.

    Maybe:<br />
    Dafizilla Table2Clipboard: https://addons.mozilla.org/firefox/addon/1852

  • How to filter spark datagrid?

    SORRY, I TRY TO FILTER MY DATAGRID, BUT IT DOESN'T WORK.
    WHAT'S WRONG IN THIS CODE?
    IN THE DEBUG EVERYTHING IS OK UNTIL THE BOLD TEXT, BECAUSE THE DATAPROVIDER IN DATAGRID IS NOT FILTERED.
    PLEASE HELP ME!!!
    THANK YOU.
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Albo" creationComplete="init(event)">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                import spark.events.GridEvent;
                import spark.events.TextOperationEvent;           
                import spark.components.TextInput;           
                import spark.components.DataGrid;
                import mx.collections.ArrayList;
                protected function init(event:FlexEvent):void
                    IngegneriXML.send();
                private function gridClickEvent(event:GridEvent):void
                    navigator.pushView(Dettaglio, event.target.selectedItem);
                private function filterDataProvider(obj:Object, idx:int, arr:Array):Boolean
                    var txt1:String = RicCogn.text;
                    var txt2:String = obj._item.cognome.toString();
                if (txt1.toLowerCase() == txt2.toLowerCase())
                    return true;
                    return false;
                protected function RicCogn_changeHandler(event:TextOperationEvent):void
                    var arr:Array = Grid1.dataProvider.toArray();
                    var filteredArr:Array = arr.filter(filterDataProvider);
                    Grid1.dataProvider =  new DataProvider(filteredArr);
                    Grid1.dataProvider.refresh();
                    var ara2:Array = Grid1.dataProvider.toArray();
                    var ara3:Array = Grid1.dataProvider.toArray();
            ]]>
        </fx:Script>   
        <fx:Declarations>
            <s:HTTPService id="IngegneriXML" url="C:\AlboFlash\DatiXML\ingegneri.xml"/>
        </fx:Declarations>
        <s:TextInput x="0" y="0" id="RicCogn" change="RicCogn_changeHandler(event)"/>
        <s:DataGrid id="Grid1" x="0" y="80" dataProvider="{IngegneriXML.lastResult.ingegneri.ingegnere}" height="100%" width="100%" gridClick="gridClickEvent(event);">
            <s:columns>
                <s:ArrayList id="columns">
                    <s:GridColumn dataField="cognome" headerText="Cognome" minWidth="100"/>
                    <s:GridColumn dataField="nome" headerText="Nome" minWidth="100"/>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>
    </s:View>

    I made it :-)
    I revealed the magic.
    Actually without knowing it, I was misusing the ArrayCollection class and treating it as Model, while it was obviously designed for View purposes.
    Now I'm using ArrayList for that, and then I create a new ArrayCollection for different views. Then I use newArrayCollection.list = myList and newArrayCollection.filterFunction = ...
    This works for me.
    My recomendation would be to improve the documentation a bit, so that it is clear that it is not recommended to use same ArrayCollection for multiple views.
    Regards,
    Dinko

  • INSERT of two records into different tables (pk value from first to second)

    Hi there!
    Have probably stupid question
    Need to insert one record into table with primary key and then insert into other table record with value of primary key field from first record
    How can I do it?
    Thanks a lot!!!

    You have several possibilities. Most easiest one is listed first :)
    SQL> create table a (a number);
    Table created.
    SQL> alter table a add constraint a_pk primary key (a);
    Table altered.
    SQL> create table b (a number);
    Table created.
    SQL> alter table b add constraint  b_a_fk foreign key (a) references a(a);
    Table altered.
    SQL> insert into a values (0);
    1 row created.
    SQL> insert into b values (0);
    1 row created.Though that may not help always, so the next possibility maybe just using sequence with nextval and currval (currval can be used only in the same session and only after you have issued at least one nextval)
    SQL> create sequence a_seq;
    Sequence created.
    SQL>  insert into a values (a_seq.nextval);
    1 row created.
    SQL> insert into b values (a_seq.currval);
    1 row created.And you can use also famous returning clause. It is a bit easier to show that in the pl/sql block than pure SQL.
    SQL> declare
      2   v number;
      3  begin
      4   insert into a values (a_seq.nextval) returning a into v;
      5   insert into b values (v);
      6  end;
      7  /
    PL/SQL procedure successfully completed.And at last contents of the tables :)
    SQL> select * from b;
             A
             0
             1
             2
    SQL> select * from a;
             A
             0
             1
             2Gints Plivna
    http://www.gplivna.eu

  • Values not getting displayed from first page of the report.

    Values in the report is getting displayed from second page.
    First page in the report only displaying the report title and column names.
    Secone page onwards, data and column names are generated.
    Can any one please help me, with the cause of the problem.

    what reporting tool?
    Interactive Reporting
    Financial Reporting

  • SSRS Multi Value Parameter-- though multiple checkboxes ie values are selected ,data is retrieved only from first selected checkbox

    Hello Forum Members,
    I have a Multi Valued Parameter as text field.
    Input field Sale_Month is of the type Nvarchar in the Database and has 2014.01,2014.02,2014.05 etc.
    I can multi select the values but when I run the report only values from first check box are retrieved though I have data for all.
    Please advise me.
    Sqlquery9

    Go to tablix properties, under Filter tab make sure that the Sale_Month filter expression has "IN" operator. Also make sure that the value expression has =Parameter!Sale_Month.Value
    Regards, RSingh

  • How to trigger a second workflow from a workflow?

    Hi All,
              I want your guidance in deciding the process flow of a workflow to be developed.
              We have a scenario in our project where we have to develop a workflow for vendor creation/change
              done through a portal.Now we have designed to do through this 2 workflows.
              First workflow is triggered when the create/change is done in the portal and the entry is made in a
              z table.This is the trigger point of first workflow.
              First workflow will identify all approvals and store them in another z table with all the approval levels  needed and the approval groups stored in the z table itself.
              Second flow will trigger on the entry made in this z table.It will read all approvals and send the mails to tha approvers in the respective aproval groups.
    Now can you please verify this.Is it possible to trigger a second workflow from a workflow?
    If yes then can you please explain the methodology to do the same?
    Also if any other approach can be taken,please suggest the same.
    Thanks a lot,
    Saket.

    First Develop a Z Business OBject (let ZVENDOR) to update the Z table when ever a Vendor is created or Changed.
    Now For the first workflow do like this
    From the WD application when the user clicks on the SAVE button then call the Function module SAP_WAPI_START_WORKFLOW .
    Develop a method in the ZVENDOR to update the Z table.Make the method as background.
    Use the method that you have created in the above point in the first workflow but prior to this make sure that you have passed all the required information to the workflow.
    Once the table is updated.
    For Second Workflow
    Create a Change document object for the Ztable.
    And trigger the workflow when ever any entry is made or changed in the z table

  • I have a hp psc 750 why does my second sheet come out first and the second sheet comes first

    I have a HP PSC 750 printer and when I type a message 2 sheets long, the second prints out first and the second sheet comes out first, can you help? 

    @paddyv, Welcome to the Community!
    You should have the option in the program you're printing from, to change the page order. Check the settings in the program.
    If you cannot find the options, please let me know which program and operating system you're running and I will have a look in to this for you.
    Best wishes
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Open a second BPF from a the current BPF

    Hi,
    is there a way to open a second BPF from the one I am currently working in? My idea is to create a first BPF (e.g. called "Overview") that lists task groups such as Consolidation, HR Planning, Revenue Planning etc, where each task then links to another BPF that will open, e.g. clicking on Consolidation would open a BPF called "Consol" or clicking on HR Planning would open a BPF called "HR".
    I do not want to use just one BPF where each of the above groups is a heading because then I would have to mark each as complete before I can move to the next which doesn't work since the is no real natural order to them.

    Hi Arnold,
    We dont have the feasibility to open another BPF from one.
    I can give you one work around for this. Create Custom Menus. You cant maintain different custom menus as tabs in the single excel sheet. And you can navigate between them using the Action - "CHANGEMENU".
    Hope this helps.

  • Psychadelic effects when opening second image from RAW

    Photoshop CS6 beta 64 bit, Windows 7 Pro 64 Bit
    Radeon HD4850
    Working on PSD file, then opened second image from ACR.  After choosing 'Open Image' from ACR the second file appeared onscreen, with the first image behind it in psychadelic colours.
    Zooming caused the second image to leave ghost images on the psychadelic background.
    Unable to work in either image, had to close down using Task Manager.

    Sounds like it could possibly be a graphic card issue. Have you updated your drivers recently? Up to date drivers usually take care of issues like this. You might even want to reinstall the drivers.
    If that doesn't work, make sure to post your system info as a reply. System Info from Photoshop

  • Filter ip addresses from access logs of Directory Proxy servers

    Hi,
    I have a network loadbalancer before 2 DPS instances (v6.3.1) and the network loadbalancer probes the 2 instances every 3 seconds.
    In orther to avoid spamming of the access logs I would like to filter every connection from those ip addresses from writing in the access logs.
    Is this possible without having to modify the log level, since I need the connection INFO for statistics and/or impact analysis operations.
    regards,
    Vincent

    Hello,
    Many customers use F5.
    However, there is no mechanims at the LDAP protocol level to carry initial client IP address down to the ultimate server
    -Sylvain
    When closing a thread as answered remember to mark the correct and helpful posts to make it easier for others to find them

  • Query a second form from another form by passing value

    Hi,
    I have two forms. I am trying to query a second form from another form. I have managed to display the query results in the second form by passing value from the first form. I did it according to the details in the Oracle 9ias Portal Technical FAQ html file.
    It works fine when there is already a row in the first form. When I insert a new row in the first form and query the second form which has key from the first form, there is no matching rows displayed which is correct but detail action mode is 'NONE' for all detail rows.
    According to the FAQ, it says the following:-
    "When the called form is started, it executes a query with the supplied condition (in this case, "where deptno=10"). If the query is successful, the matching rows are displayed in Update mode. If no matching rows are found, the form starts in Insert mode."
    It does not happen for me. I get NONE mode for no matching rows. Is this a BUG ? I am working on Portal version 3.0.9.8.0.
    Is there something wrong in the code I wrote ? I would like to have all the detail mode as Insert.
    Here is the following code I wrote on SUCCESSFUL SUBMISSION OF THE FORM.
    declare
    my_url varchar2(1000);
    v_deptno number;
    begin
    v_deptno := p_session.get_value_as_NUMBER(p_block_name => 'DEFAULT', p_attribute_name => 'A_DEPTNO');
    my_url := 'PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1268491962&p_arg_names=_show_header&p_arg_values=YES&p_arg_names=deptno&p_arg_values='||LTRIM(TO_CHAR(v_deptno))||'&p_arg_names=_deptno_cond&p_arg_values=%3D';
    go(my_url);
    end;

    Hi,
    The behaviour is OK as in the MD form there are two states "Save" and "Query and Save" and when the form is in "Query and Save" mode that means you can use it for both Query aswell as Save which is decided by your "Master action" if that is None it is used for Query , for Insert you will have to select Insert ,this is the Insert Mode behavior.
    If you open a new MD form that is also in the "Query and Save" the same behaviour will be there.
    Hope this answers your query.
    rahul

  • Duplicating an action on second object from it´s own center

    I can't find a way to do this
    I often need to repeat an action, such as resize an object proportionally from center (using alt+shift) or rotating for example. I get same object resized or rotated in same place and maintaining it´s center.
    But when i repeat the action with control or command D on second object, it does not respect it´s center, while it seems to do it from first object´s center, so it moves.
    Is there a way to set the center point for repeat or duplicate?
    Thanks guys.

    LOL, but I still feel that you didn't follow my instructions as intended.
    Try exactly this :
    1. with an object selected, press R , click and drag anywhere on the screen to rotate freely the object.
    2. hold Ctrl key down to switch temporarily to a selection tool and select another object. After that release the Ctrl key to get back to the Rotate tool.
    3. Press Enter twice.
    Now compare:
    In step 1 using the bounding box, first you have to move  the mouse around corners of the bounding box, wait until the rotate indicator appears, click on it and drag away from the corners to increase precision when rotating. For me in this step using the bounding box is much more difficult than the rotate tool. Did you try that?
    In step 2 using the bounding box, you do the same mouse movements except that you are not holding the Ctrl key. For me this step is slightly easier with the bounding box because you don't hold the Ctrl key
    In step 3 using the bounding box you press Ctrl + D. For me in this step pressing Enter twice is slightly easier than pressing Ctrl + D which may require sending a look to the keyboard.
    That's it, there is no such thing as ... humm enter percentage
    that's my point

Maybe you are looking for