Accessing Datagrid row data from within an itemRenderer

I would like to know how I can access another row's data from within an itemRenderer.  I need to do some formatting of my cells based on other row data. Here's what I mean... I have a datagrid and in row 0 col 2's itemRenderer I would like to access row 1 col 1's data in order to do a comparison so I can determine how to format row 0 col 2's data and so on.  Is there a way from within the item renderer to reach into another row and access the data?  I can't seem to find a clear answer so I thought I'd go to the pro's.
Thanks!!

You can use this code to get to the dataProvider of the grid.
var o:Object = this.parent.parent;
var dp:Object = o.dataProvider;

Similar Messages

  • How to access Previous Records' Data from within a Query?

    Hi All,
    I am making a report in which I need to compare my "Registration Start Date" with "Registration End Date" of previous registration of same customer. This is to check if there are gaps between any customer's registrations.
    In scenario shown below, I want to filter out RegID '1' as it comes after a gap from previous registration(RegID '3') of the same customer.
    RegID CustID Registration Start Registration End
    1 1 01/04/2005 07/04/2005
    2 2 01/03/2005 29/05/2005
    3 1 21/03/2005 29/03/2005
    4 1 01/03/2005 21/04/2005
    I created the join of this table with itself to pick previous records. it is something like:
    Current_Rec.Cust ID = Prev_Rec.CustID AND
    Current_Rec.RegStart > Prev_Rec.RegEnd
    But this gives wrong data if customer has 3 back-to-back registrations. i.e. Shows last registration in query results as their is a gap between 3rd and 1st registration. But ofcourse there was another record between these two(which was 2nd registration).
    It would be so nice of you guys if you can suggest a solution to this. Any oracle function?
    Thanks & Regards,
    Ahsan

    I Assume the following is your sample data
    Table Name: Tab1
    RegID CustID Registration_Start      Registration_End
    1      1      01/04/2005           07/04/2005
    2      2      01/03/2005           29/05/2005
    3      1      21/03/2005           29/03/2005
    4      1      01/03/2005           21/03/2005
    Note : For the Regid "4" I have changed the Registration_End to 21/03/2005. It was earlier 21/04/2005.
    Coming to the query, you need to generate the list of regid that have gaps.
    Try the following query:
    SELECT c.*
    FROM tab1 c
    WHERE c.reg_id NOT IN (
    SELECT a.reg_id
    FROM tab1 a, tab1 b
    WHERE a.cust_id = b.cust_id
    AND a.registration_end = b.registration_start
    Note: I am sorry I didn't have access to the data base to execute my query. Correct me if I am wrong.
    Regards,
    Somu

  • Access report row data from javascript

    -- I have a report. Something like this.
    Select id, name, htmldb_item.checkbox(1, '#ROWNUM#')
    from test;
    -- I can get the rownum via javascript.
    var ml = document.wwv_flow;
    var i;
    for(i = 0; i < ml.elements.length; i++){
    alert("name = " + ml.elements.name);
    alert("value = " + ml.elements[i].value);
    -- I would like to access the other items I selected in the report from javascript. ie. id and name.
    -- So knowing the rownum how do i get those values for a given row?
    Thanks
    Jon

    hi jfortney,
    i have one problem in oa framework, ie i need to get the row number by javascript but could not do . my way is
    document.getElementById('tableid').rows.length.. but there is no id for that table when i c the view source. so please suggest me some idea as to how to get the row number of a table in oa framework page.
    thanks in advance...
    prabhakaran.p

  • How to access listbox binding data from a button which is not part of listbox in xaml page

    Hi
    I have the below listbox and its bdining as below
     <ListBox x:Name="listMyPosts" ItemsSource="{Binding Path=MyPostsDataSource}" Grid.Row="0"  >
               <ListBox.ItemTemplate >
                          <DataTemplate >                                      
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="{Binding
    NewPostText ,Mode=TwoWay}"/>
                                            <TextBlock Text="{Binding
    NewPostSender}"/>
                                        </StackPanel>                                      
                                </DataTemplate>
                </ListBox.ItemTemplate>
               <Button content="Send Post" command ="Binding SendClickCommand} />
      </ListBox>
    And i am assining postsViewmodel
    private PostsViewModel _PostsViewModel ;
    public Conversation()
    InitializeComponent();
    _PostsViewModel = new PostsViewModel ();
    this.DataContext = _PostsViewModel ;
    public ObservableCollection<PostsModel> MyPostsDataSource
    get
    if (_MyPostsDataSource== null)
    _MyPostsDataSource= GetMyPosts();
    return _MyPostsDataSource;
    set
    this._MyPostsDataSource = value;
    RaisePropertyChanged("MyPostsDataSource");
    is that possible to access listbox binding data from the ViewModel's SendClickCommand property ?
    Krrishna

    If you need to pass to the command selected item, try this
    <Button Сontent="Send Post"
          Сommand ="{Binding SendClickCommand}"
          CommandParameter={Binding ElementName=listMyPosts,
    Path=SelectedItem}/>
    msdn

  • How to access internal table data from webdynpro to Flex application.

    Hi Connoisseur
    The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and  Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
    There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
    i tried to do pass internal table value  to flex-datagrid.but its not work.
    i would like to know
    1.how to access internal table data from webdynpro to Flex application.
    2.how to pass the internal table to flex-datagrid.
    2.how to pass dynamically in ADOBE flex.
    3. how to do Flex is receiving the wd context data?
    4. how can we update WD context with FLEX data.
    Ple give me sample example and step by step procedure.
    Regards
    laxmikanth

    Hi Laxmikanth,
    Please refer this...
    Flash island: update complex type from flex
    Cheers..
    kris.

  • Access Address Book data from terminal

    Hi everyone,
    I was wondering if there is a way to access Address Book data from the terminal. For instance, I would
    need a command that would output an address of a given person.
    Thanks in advance for your input

    this script could be used in Terminal (save the code below as
    "getaddress" and mark it as executable):
    case $# in
    2) firstname=$1; lastname=$2;;
    *) echo 'Usage: getaddress <firstname> <lastname>' 1>&2; exit 1 ;;
    esac
    count=`osascript -e "tell application \"Address Book\" to count (people whose first name is \"${firstname}\" and last name is \"${lastname}\")"`
    case $count in
    0) echo "$firstname $lastname is not in Address Book." 1>&2; exit 1;;
    1) ;;
    *) echo "There are multiple entries for $firstname $lastname in Address Book (unhandled error)." 1>&2; exit 1;;
    esac
    osascript -e "tell application \"Address Book\" to get formatted address of address of first person whose first name is \"${firstname}\" and last name is \"${lastname}\""
    Message was edited by: jazzy79

  • Access to EHS data from system outside of SAP

    We are creating a Formulation tool in a SQL database with a Access front end which will need to use EHS Specification data and eventually push the Formulation data back into the SAP EHS Spec database.
    I would like this new database to have Real-Time access to SAP data. We currently are using RFC connections with tools such as EASY-Expert and a external Rules based program Atrion as well, so I know it is possible to feed this data back and forth using XML files.
    Any advice on how I should proceed and maybe some external tools for purchase that will help me do this.

    Hi Beverly,
    it is possible to access EH&S data from outside SAP by using the standard SAP BAPIs (e.g. BAPI_BUS1077_GETDETAIL for reading EH&S data) which are RFC enabled. Another possibility would be to develop your own RFC enabled function modules in the SAP system and call them from outside.
    From your access database you can use VBA to perform the RFC call.
    Best regards,
    Andreas

  • Access SQL-Server Data from Oracle 10gXE

    Hello,
    I want to access sql-server data from oracle 10g XE. I need the same functionality provided by Sql-server by Linked Servers, by which we can query on any data source(oracle, Excel, Access).
    do, Oracle 10gXE provide us with same functionality ???
    any pointers ???

    Yes, it does work with Express Edition.
    Here is a thread from the XE forum with examples.
    Re: Database Link to MS Access
    They refer to a MS Access database, but the procedure is the same.
    Doug

  • How to access Sybase IQ data from SAP BW

    Hi,
    I read from Sybase website that we can access Sybase IQ data from SAP BW using Remote Cube through JDBC driver.
    Is there any documentation on how to configure that?
    Thanks in advance for your help.
    Our BW version is 7.01
    Sybase IQ is 15.4
    Thanks,
    CH

    Hi,
    The two files that are created are one is Control File ( will save as filename_s ) and other is data file. The control file will give you the details of your fields in your Infospoke
    regards
    Srini
    Message was edited by:
            Srinivas

  • Return data from spark list itemrenderer

    Does anybody no how to return data from the itemrender for a spark list. say i had a checkbx in my itemrenderer how can I get that info back to my main component if its selected or not. I looked at datagrid and itemeditor but I really rather use a spark list. Thanks

    thanks I also found another way to doing it. A click handler on my list when that fires I can check if checkbx has been selected by doing event.target.document.mycheckBx.selected this will not work if using currentTarget cause it take the info from the itemRenderer. Now I understand the difference between currentTarget and target.
    not sure if this is a better way to access the data I think I might still just dispatch a event and do it your way.
    Its weird that mx:list has a editItemRenderer  and s:list does not
    thanks again TK

  • Programmactic Access DataGrid Rows and Columns

    Hello,
    I am new to ActionScript. Can you tell me how can I access
    the rows and columns of a data grid?
    What I want to do is that when the application load, I will
    populate the datagrid with the Xml returned from the webservice.
    After that, webservice will be called periodically (using timer)
    and the information in the datagrid needs to be updated. The cells
    which are updated need to be highlighted.
    The datagrid actually contains the stock market data (symbol
    name and its other attributes). So once the datagrid has been
    populated on application creation, it contains all the symbols in
    the market. After that, only attributes of the symbols will change,
    like price, volume etc. What I want is that once the datagrid is
    populated, i can access the row by using the value of symbol code
    and then update the appropriate columns of that symbol. (Xml from
    next time will contain only symbols whose values change from last
    time).
    Below is the code that I have written so far.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="OnAppCreationComplete()" width="100%"
    height="100%">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    private var count:uint = 0;
    private var messageFramXmlList:XMLList;
    private var marketSnapshotTimer:Timer = new Timer(1000);
    private function OnAppCreationComplete() : void
    this.ajaxServiceInvokerProxy.addEventListener(ResultEvent.RESULT,
    this.OnWebServiceResultArrived);
    this.ajaxServiceInvokerProxy.InvokeService.send();
    this.marketSnapshotTimer.addEventListener(TimerEvent.TIMER,
    this.OnSnapshotTimerTick);
    this.marketSnapshotTimer.start();
    private function
    OnWebServiceResultArrived(event:ResultEvent) : void
    var marketSnapshotXml:XML = new XML(event.result);
    this.messageFramXmlList =
    marketSnapshotXml.child("MarketSnapshot").child("MessageFrameList")[0].child("MessageFram e");
    this.dgTopPosts.dataProvider = this.messageFramXmlList;
    this.btnCounter.label = this.count.toString();
    private function OnSnapshotTimerTick(event:TimerEvent) :
    void
    this.count++;
    this.ajaxServiceInvokerProxy.InvokeService.send();
    ]]>
    </mx:Script>
    <mx:WebService id="ajaxServiceInvokerProxy"
    wsdl="
    http://jehanzeb/ajaxserviceinvoker/ajaxserviceinvoker.asmx?wsdl"
    useProxy="false">
    <mx:operation name="InvokeService">
    <mx:request>
    <serviceWithComonentName>DetailedSnapshotComponent.MarketSnapshot@TADAWUL</serviceWithCom onentName>
    <parametersXml><![CDATA[ <Parameters/>
    ]]></parametersXml>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:Panel x="10" y="10" width="100%" height="100%"
    layout="absolute" title="Market View">
    <mx:RichTextEditor id="txtMarketViewResult" x="10" y="10"
    width="612" height="194" />
    <mx:DataGrid x="10" y="223" id="dgTopPosts" width="100%"
    height="303">
    <mx:columns>
    <mx:DataGridColumn headerText="Symbol Code"
    dataField="SymbolID" />
    <mx:DataGridColumn headerText="Last Time"
    dataField="LastTime" />
    <mx:DataGridColumn headerText="Net Change"
    dataField="NetChange" width="75"
    />
    <mx:DataGridColumn headerText="Percent Change"
    dataField="PercentChange" width="75" />
    <mx:DataGridColumn headerText="Previous Closed"
    dataField="PreviousClosed" width="75"/>
    <mx:DataGridColumn headerText="Close" dataField="Close"
    width="75"/>
    <mx:DataGridColumn headerText="Direction"
    dataField="Direction" width="75"/>
    <mx:DataGridColumn headerText="BidPrice"
    dataField="BidPrice" width="75"/>
    <mx:DataGridColumn headerText="AskPrice"
    dataField="AskPrice" width="75"/>
    <mx:DataGridColumn headerText="BidVolume"
    dataField="BidVolume" width="75"/>
    <mx:DataGridColumn headerText="AskVolume"
    dataField="AskVolume" width="75"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:LinkButton id="btnCounter" x="10" y="528" width="306"
    textAlign="left" label="" />
    </mx:Panel>
    </mx:Application>

    To achieve what you want, I would have two functions:
    * One populates the DataGrid for the first time, i.e. the
    inital load
    * The other does the 'update' on each interval, since there's
    logic required
    To update the DataGrid with only the rows that have changed,
    you're going to have to compare
    the incoming XML to the existing XML in the dataProvider of
    the DataGrid, then selectively update the dataProvider.
    You can use the
    getItemAt() and
    setItemAt() methods of the data provider to check each row
    against the incoming data. So, some example code:
    // This is the function which handles the result of your
    'updated data only' webservice
    private function handleUpdateInvoke (event:ResultEvent) :
    void {
    var incoming:XML = new XML(event.result);
    var someList:XMLList = incoming.somePattern;
    // For each data provider item, check the key and if it
    matches
    // one of the incoming keys, update it at that index
    var numRows = this.dgTopPosts.dataProvider.length;
    var existingDataRow:*
    for (var i:Number = 0; i < numRows; i++) {
    existingDataRow = this.dgTopPosts.dataProvider.getItemAt(i);
    for each (var newDataRow:* in someList) {
    if (existingDataRow.SymbolID == newDataRow.SymbolID) {
    this.dgTopPosts.dataProvider.setItemAt(newDataRow, i);
    }

  • Cell width from within my itemRenderer

    Hi, can anyone tell me how to get the width of the DataGrid
    cell from within my ActionScript itemRenderer (separate
    ActiionScript file)? I've tried a few things, but I seem to keep
    getting back zero...
    Thanks

    Using the this.width property in the set data function of my
    itemRenderer seems to work... sorta - seems that the set data is
    called multiple times, sometimes with the width and sometimes with
    0...

  • How to get access to Row Data (Child Text) in a Tree Control Pragmatically?

    In LabVIEW 2010, I have entered Row Data into a Tree Control pragmatically using the Add Item method and providing the Child Text array and the Child Tag for the Row. When a Row in the Tree Control is selected, I can get the Row Tag in the Value Property of the Tree. But how do I access the Child Text array data when the Row is selected? I can't seem to find a Tree Control Property or Method that will return that data back again.
    What I am trying to do is: once a Row in a Tree is selected and a button is pushed, if the Row Tag is valid, I want to transfer all of the Row data into another similarly formatted Tree. To do that I need the Row Data for the Tree and Row that was selected. I can not find a way to get access to this Row Data after it has been entered into the Tree.
    Can anyone tell me how to pragmatically access the Child Text or Row Data in a Tree Control from a selected Row in the Tree? I have the Tag for the Row, but how do I access the data?
    Thanks for your assistance.
    Solved!
    Go to Solution.

    As mentioned in the posting here, you can use the Active Item:Tag property to set the item to which subsequent property changes apply. This includes pulling the Active Celltring values out in a for loop as you increment the Active Cell:Active Column Number to get the row's Child Text data programmatically as I was originally wanting to do.
    Note that wiring a 0 to the ActiveColNum property and reading the String value will return the tree item's visible name (in column 0), but not the unique item Tag (which is somewhat intangible after its creation). Therefore, I save the unique item tag when I add the item to the tree control (the output of the Add Item invoke node) and store it as a separate column of the Child Text array and place it out of sight in the tree control so I have access to it later. It might be useful, it might not.
    I find the tree control totally non-intuitive and not well explained anywhere, but that's how a lot of LabVIEW coding is I guess. Play with it long enough and you become an expert. I had to learn the hard way, but I hope this helps someone else.
    -Richard
    "Computers are useless. They can only give you answers." - Pablo Picasso

  • HELP Filling a datagrid with data from various tables

    MHI, this is simple.
    I have 2 tables.
    ORDERS and CLIENTS.
    table ORDERS are columns:  order_id, client_id, status
    table CLIENTS are columns: client_id, client_name
    my datagrid would have the columsn: order_id, client_name, status.
    Thats all. I can't simply do it in Flex. HELP PLEASE.
    These are my approaches:
    1 - tried to create a new array collection with mixed data from these 2 tables to use as dataprovider in the datagrid.
    even the ac is [Bindable], the datagrid won't update. Probably Im creating the ac in a wrong way.
    2 - tried to use the ORDERS table call responder lastResult property (that works out to fill the data grid) and add a new colounm (client_name) within each item inside the ORDERS array collection.
    I'm not able to ADD a property/field/column inside the ac.  Of course, when I use .addItem, it will create a new "order"  not a new "order.property"
    if something like:  ac.source[i].push({client_name:clientName}) worked...
    My goals are simple. To fill the datagrid with those data.
    Ah.. i almost forgot...
    supose CLIENTS have 1000 registers.
    I don't have to bring all those registers within flex to look for only one ID to retrieve a name to fill the orders datagrid, right?
    THANKS A LOT
    btp~

    Ok,  this is my first approach:
    this function is an auto-generated event that happens when I drag a databank operator over a datagrid. Datagrid's dataprovider IS set to "orders":
    (in my browser, the following messed lines only show decent while editting. Maybe copy it into a editor to better visualize: )
    protected function getOrders_pagedResult_resultHandler(event:ResultEvent):void             {                 orders = getOrders_pagedResult.lastResult                          //1 - this was previous declared as a Bindable Array Collection.                                             var ta:Array = new Array;                                 for (var t:String in event.result)                 {                     var tp:Array = new Array();                        tp.push(getOrders_pagedResult.lastResult[t].order_id);        //is it any difference to get data like in THIS LINE                           tp.push(event.result[t].status)                               //or THIS?                                             var cn:String = getClientsByID(event.result[t].client_id);     //this won't work in time. The getClientsByID delays to get data.                     var obj:Object = {client_name:cn};                             //so cn, in this line, will be "null". How can I handle this?                                         tp.push(obj);                                         ta.push(tp)                  }                                 orders.source.push(ta)                                             //this is what I wanted datagrid to show, but it doesn't.                                                                                    //if I leave the first statement, everything above is ignored                                                                                    //if I comment the first line, datagrid shows nothing.                            } 
    I realize that the code above won't work because the properties inside each item won't have a "label" to datagrid to call in dataField property...I don't know how to do that. I thought by creating an object (like the obj above) it would work...  it wont.
    My getClientsByID is a modificated auto-generated function which doesn't work properly:
    (in my browser, the following messed lines only show decent while editting. Maybe copy it into a editor to better visualize: )
    protected function getClientsByID(itemID:int):String {         getClientsByIDResult.token = clientsService.getClientsByID(itemID);         return(getClientsByIDResult.lastResult.name); } 
    It seems it doesn't work (returns null) because the function runs faster than the call responder result.
    Creating a listener for everything seems to be not the best practice, but a band-aid...
    Again.
    I should create a class in php to return the "ready-to-use" data. Ok?
    Thanks a lot for your comments. Do I miss any important part of the code?
    Btp~

  • Accessing  linkbutton cell data from a system matrix

    I am using the UI SDK with SBO to develop an add-in. I am trying to access data from the matrix on the Sales Order form and I am stuck where the cell type is a link button.
    I have figured out how to do it for an Edit cell and a Combobox cell using the UI SDK, but in the case of a link button, the only property available for that item type is the LinkedObject property which is a BoLinkedObject enumeration.
    How whould I get the "Item No." value for example as entered in the form's matrix by the user?

    hi,
    A linked button works the same as an edit text. Just cast the specific object of the cell in an edit text object
    In C# code this gives the following
    string val = ((SAPbouiCOM.EditText)mtrx.Columns.Item(colID).Cells.Item(row).Specific).Value;
    Yannick

Maybe you are looking for

  • How do I turn off Keynote

    I never purchased Iwork although it is still on my hard drive. I use Office 2000. However. when someone mails me a slide show, almost invariably a Powerpoint file, Keynote comes on. The display is great, but I can't get the sound. I can't figure any

  • In query, how many objects can include in structure

    Hi expert, In BEX query coloum, How many objects can include in structure.

  • F-28 customer holding by F110

    Hi Colleagues. Anybody knows if there is a way to issue a message from transaction F-28 when a document was held by transaction F110 ? When the user try to do a receivable write off document, the SAP system doesn't shows message to user's help. Runni

  • File system and LR2 file system view summary

    Hello, Is there a way when navigating a directory via the Folders panel to click on the folder and get summary information about the contents of the folder both from a file system perspective as well as a Lightroom perspective? file system perspectiv

  • Web dyn pro or BI

    Hi All,           Basically i am an ABAPER ,My organisation asked me to undergo training in BI or Web dynpro. Can you folks suggest me which one to chose. Ashok....