MouseOver DataGrid - which cell?

Hi Folks,
I've set a mouseOver handler on my DataGrid. In that handler,
I need to find out which row just got moused over. Is there a way
to do this?
Thanks,
ws

Here's the handler. It seems to get executed far more often
than I expected, usually without the load of data I'm expecting. Do
I really have to do all these checks to make sure I've got valid
data? Is there a better way?
private function mouseOverHandler (e:MouseEvent):void
if ("target" in e)
if ("listData" in e.target)
if (e.target.listData != null)
if ("rowIndex" in e.target.listData)
if (e.target.listData.rowIndex > 0)
grdClipboard.toolTip = e.target.data.AcntEmail;

Similar Messages

  • Table component - how to find out which cell is clicked

    Hello!
    I have a couple of questions regarding table component
    1. Is there any way to find out which table cell is clicked on?
    2. And is it possible to paint clicked cell programmatically?
    Possible solution might be a Select Boolean Checkbox inside a cell, but anyway, i'd have to determine which cell contains this checkbox (some kind of cell coordinates, etc...)
    Thank you

    1. Is there any way to find out which table cell is clicked on? It would be easy to suggest the way, if you can share us the requirement
    2. And is it possible to paint clicked cell programmatically?You can do it through javascript by setting contentStyle property.
    Sample Code:
    <af:table ...>
      <af:column>
         <af:inputText ...>
                  <af:clientListener method="paintCurrentCell" type="click"/>
         </af:inputText>
      </af:column>
    </af:table>
    <!-- javascript method -->
    function paintCurrentCell(event){
        event.getSource().setContentStyle("background-color:red");
      }Sireesha
    Edited by: Sireesha Pinninti on Nov 10, 2009 7:01 PM

  • How to determine which cell the user has just left?

    I want to check the contents of a JTable cell just after the user has left that cell.
    What is the most reliable way to determine which cell the user has just left?

    Hi,
    I use the cellRenderer for that... if the value is not correct, I call an editCellAt() method...
    JRG

  • Tooltip for datagrid's cells

    I know how to create a tooltip for datagrid and/or its
    columns. Is it possible to create a tooltip (or something similar)
    for each cell? So whenever the mouse is over a certain cell, a tip
    would be shown for that cell that depends on the value of the cell.
    Similar functionality can often be seen in web-based database apps:
    an Ajax query gets related data from a database on mouseOver.
    My need and idea is to
    - show a simple text list as a tooltip
    - the text would be fetched from a database via a web service
    - the fetch would be based on datagrid's (hidden) rowid and
    each column's (hidden) column id (which are real database columns)
    - the database structure is an n:m relation i.e. one
    rowid+colid can refer to several items that are then used in the
    tooltip
    Use case: A number is displayed in the datagrid. The need is
    to display 0-n references related to that specific figure (e.g.
    book names, notes etc) in the tooltip. Next cell's tooltip would be
    showing different references.
    Anybody any ideas or suggestions? Thanks!

    Hi,
    Did you try creating a custom itemRenderer and handling the
    mouse events for that item renderer component. There is also a
    property called dataTipFunction, please check that too.
    Hope this helps.

  • How  to set DataGrid one cell colour

    I want to set one cell colour in DataGrid,for example,when a
    set a CheckBox in DataGrid ,I want letset this Cell's colour
    change

    One way to work around this, might be to create your own
    cellrenderer with an extra backround movie clip. So as you pass the
    value of the check box, either you set the fill color of the BG
    movie clip or just hide/show the BG clip.
    I hope the following brief script might be of help,
    class myCell extends UIComponent
    var bg:MovieClip;
    var cBox:CheckBox;
    function createChildren(Void) : Void
    // Create a new CheckBox
    // Create a new Background Clip
    bg = this.createEmptyMovieClip("bg_mc" , 0);
    bg.beginFill(color, fill);
    bg.moveTo(0, 0);
    bg.lineTo(4, 0);
    bg.lineTo(4, 4);
    bg.lineTo(0, 4);
    bg.lineTo(0, 0);
    bg.endFill();
    size();
    function size(Void) : Void
    super.size();
    this["bg_mc"]._width = width;
    this["bg_mc"]._height = height;
    invalidate();
    function setValue(cellVal) : Void
    if (cellVal == true)
    bg._visible = true;
    else
    bg._visible = false;
    Notes: BG: is the background movie clip.
    You will need to use AS based cellrenderer

  • Flex air datagrid setfocus cell by cell

    Hi all,
    I have a datagrid with custom itemRenderer. Now I need to setfocus int the grid cell by cell. For that I Googled & got a way i.e
    var findrowindex:int = 0;
    //nextButton Click Handler
    var focusedCell: Object = new Object();
    focusedCell. columnIndex = 3;
    focusedCell. rowIndex = findrowindex;
    dg.editedItemPosition = focusedCell;
    dg.validateNow( );
    findrowindex++;
    Using this I am able to get focus in a cell but the focus is not moving from one cell to another. Pls suggest me where I am going wrong or suggest me any ther way to achieve this.
    Thanks.

    You can call preventDefault on ITEM_EDIT_BEGINNING to cancel editing.  I
    suppose if you track the current selectedIndex on mouseDown and see if it
    changes by the time you get to ITEM_EDIT_BEGINNING you could do that.

  • DataGrid update cell event generated twice

    Hi all,
    We are trying to create an editable cell in a datagrid, and in the itemEditEnd method to display an error message if the new value introduced is incorrect. The problem here is that the event is always generated twice.
    Do you know what could cause this?
    Thanks,

    Hi,
    Can you add some additional info.As I checked at my end the things are working fine.
    You can check with the below sample applicaiton:-
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.controls.Alert;
                import mx.events.DataGridEvent;
                [Bindable]
                private var ac : ArrayCollection = new ArrayCollection([
                    {lbl :"lable1",data:"data1"},
                    {lbl :"lable2",data:"data2"},
                    {lbl :"lable3",data:"data3"}
                protected function datagrid1_itemEditEndHandler(event:DataGridEvent):void
                    trace("Check");
            ]]>
        </fx:Script>
        <mx:DataGrid dataProvider="{ac}" editable="true" itemEditEnd="datagrid1_itemEditEndHandler(event)">
            <mx:columns>
                <mx:DataGridColumn headerText="Lable" dataField="lbl" editable="true" />
                <mx:DataGridColumn headerText="Data" dataField="data" editable="true" />
            </mx:columns>
        </mx:DataGrid>
    </s:Application>
    with Regards,
    Shardul

  • ItemFocusOut not catching  "TAB" key in Datagrid edited cell?

    In DataGrid, "keyUp" can catch "TAB" key when it is pressed,
    but the Keyboard event has less information needed. I tried
    itemFocusOut, but it seems DataGridEvent would not catch it. Any
    tips on how to make "TAB" key generate DataGridEvent or similar
    event?
    Platforms with this issue: WIN-XP/JDK-1.6/Air-1.5/FLEX
    SDK-3.2
    Thanks!
    -Herbert

    Let me rephrase like this:
    In our application, a DataGrid’s edited cell has
    “itemEditEnd” and “itemEditBeginning”
    handlers defined. However when a “TAB” key is pressed
    to navigate from one editable cell to another editable cell, none
    of the above handlers can catch this special key stroke event.
    Our intention is to make “TAB” key to emit an
    event that can be caught by above handlers. Or, in other words, we
    would like make “TAB” key to be similar(in the sense of
    generating events) to that of “Enter” key when pressed.

  • Custom UITableViewCell: Recognizing which cell to update

    Hello,
    I have created a custom UITableViewCell in IB with two UIButtons and one UILabel. What I would like to do is have each button perform an action on the UILabel - lets just say change the UILabel's text for now. I have the following set up and everything works.
    MyViewController.m/h
    _ Has UITableViewCell property and IBOutlet connected to MyCustomTableCell
    _ Has two IBAction methods to handle each UIButton pressed
    MyCustomTableCell
    _ File Owner set to MyViewController
    _ Has tags denoting each item
    _ UIButtons events are connected to the custom methods in MyViewController.m
    Just as a test, I have populated 3 rows in the table. When I hit either UIButton from any row, it only updates the last row's UILabel text. The method that handles the UIButton's event is something like:
    -(IBAction)buttonOnePressed:(id)sender
    UILabel *myLabel = (UILabel*) [customLoadedCell viewWithTag:1];
    myLabel.text = @"button one";
    How do I recognize which row the button's event came from so I can only update that label?

    sptrakesh wrote:
    The button that triggered the event will be the child of the appropriate cell.
    Took me awhile but I finally understood what you meant. So basically what I did inside the method to handle the touch up event was:
    UITableViewCell *mycell = (UITableViewCell *)[[sender superview] superview];
    UILabel *myLabel = (UILabel*) [mycell viewWithTag:4];
    myLabel = @"test";
    The first line allows to get a reference to the UITableViewCell I tapped. If I needed the row number I could reference it by doing this:
    NSIndexPath *ip = [self.tableView indexPathForCell:(UITableViewCell *)[[sender superview] superview]];
    ip.row will return the row number.
    self.tableView is the reference to the table view.

  • Turning an object into a mouseover button which displays a Layer using Illustrator CC 17.0

    Hi,
    I've been set the challenge of creating in interactive PDF which when hovering the mouse over a button reveals some text adjacent to the button.
    I've seen it done on YouTube using an older version of Illustrator where the text box to be displayed sits on its own layer and the button reveals the layer.
    I have created the layers with the various text boxes but can for the life of me work out how to assign these layers to the object so that they are revealed by hoveing the mouse over them.
    Please help as its driving me mad.
    Grant

    This would have to be done in Acrobat using Form elements and JavaScript or by creatively (mis-)using the comment tools there.
    Mylenium

  • Mouseover returns which line of text

    Description
    List of users will show up in scrolling text field. When the
    mouse is over a line of text (the usersname) it lights up (changes
    color for that line) and when clicked returns the text in that line
    (the usersname).
    I did this years ago in Director using the mouseline function
    but I can't figure how to do it in flash. Can anyone point to an
    example of clue me into a way to do this?
    -- thanks

    you can try this formula
    replace({description field},",",chr(10))
    Now it shows the data in each line.
    after placing this formula on the report right click and go to format field>common tab>select the option can grow.
    Hope this helps!
    Raghavendra.G

  • How do you programmatically change an image in DataGrid cell

    I have a DataGrid which contains a status icon. I have been able to get the initial status icon to show in the DataGrid. But I am unable to update the it. I basically need to update the image for a selected row with either a 'assets/processing.png',  'assets/success.png' or 'assets/failure.png' image. I just cannot seem to be able to figure out how to get access to the image in the necessary cell to update/replace it. I've tried to make it a property of my ArrayCollection data provider, but that does not work. I've also have tried to some how get a reference to the original image so it can be replaced, but cannot figure out how to do such. Below is the code to my DataGrid. I will be very appreciative of any help on this. (I'm relatively new to Flex/ActionScript, but a seasoned developer otherwise.)
    <mx:DataGrid id="myDataGrid" left="0" top="0" bottom="0" right="0"
                         allowMultipleSelection="true" verticalScrollPolicy="on"
                         draggableColumns="false" resizableColumns="false" sortableColumns="false"
                         dataProvider="{myArrayCollection}">
                <mx:columns>
                    <mx:DataGridColumn headerText="Name" dataField="name" wordWrap="true" />
                    <mx:DataGridColumn headerText="Status" dataField="status" width="75" textAlign="center">
                        <mx:itemRenderer>
                            <mx:Component id="statusComponent">
                                <mx:HBox id="imageBox" width="100%" height="100%" horizontalAlign="center">
                                    <mx:Image id="statusImage" source="@Embed('assets/pending.png')" width="16" height="16"  />
                                </mx:HBox>
                            </mx:Component>
                        </mx:itemRenderer>
                    </mx:DataGridColumn>
                </mx:columns>
            </mx:DataGrid>

    Mark,
    My sincerest thanks for your assistance. myDataGrid.invalidateList() the key thing I was missing in all my previous attempts. I had thought about  needing to do something to refresh the grid, but was looking for a "refresh" method. I did not see the invalidateList() method.
    To get it to work I needed to override the Container's set data method within the status image column (see below for my full example). Without this, it does not work. Am I missing something or is there a better way to do this?
    Again, thank you very much for your help.
    <?xml version="1.0" ?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()">
      <mx:Canvas width="100%" height="100%">
        <mx:DataGrid id="myDataGrid" left="0" top="0" bottom="0" right="0"
                     allowMultipleSelection="true" verticalScrollPolicy="on"
                     draggableColumns="false" resizableColumns="false" sortableColumns="false"
                     dataProvider="{myArrayCollection}">
          <mx:columns>
            <mx:DataGridColumn headerText="Name" dataField="name" wordWrap="true" />
            <mx:DataGridColumn headerText="Status" dataField="status" width="75" textAlign="center">
              <mx:itemRenderer>
                <mx:Component>
                  <mx:HBox width="100%" height="100%" horizontalAlign="center">
                    <mx:Image id="statusImage" width="16" height="16" />
                    <mx:Script>
                      <![CDATA[
                      override public function set data(value:Object):void
                        if (value != null)
                          statusImage.source = value.status;
                      ]]>
                    </mx:Script>
                  </mx:HBox>
                </mx:Component>
              </mx:itemRenderer>
            </mx:DataGridColumn>
          </mx:columns>
        </mx:DataGrid>
      </mx:Canvas>
      <mx:Button id="updateButton" click="updateIcon()" label="Update Icon" />
      <mx:Script>
      <![CDATA[
        import mx.collections.ArrayCollection;
        [Embed(source="assets/success.png")]
        public static const successImage:Class;
        [Embed(source="assets/fail.png")]
        public static const failImage:Class;
        [Embed(source="assets/pending.png")]
        public static const pendingImage:Class;
        [Bindable]
        private var myArrayCollection:ArrayCollection = new ArrayCollection();
        private var lastIndex:Number = 0;
        private function updateIcon():void
          //sample updating
          var item:Object = myArrayCollection.getItemAt(lastIndex);
          (lastIndex % 2 == 0) ? item.status = EmbeddedImages.successImage : item.status = EmbeddedImages.fail1Image;
          myDataGrid.invalidateList();
          if (++lastIndex > myArrayCollection.length - 1)
            lastIndex = 0;
        private function init():void
          //load some dummy sample data for demo/testing
          for (var i:Number = 1; i <= 10; i++)
            myArrayCollection.addItem({
              name:"value-" + i,
              status:pendingImage
        ]]>
        </mx:Script>
    </mx:Panel>

  • Enlarging a Flex DataGrid cell on RollOver

    Hi, I have a DataGrid which has a column named Hyperlinks where I show useful hyperlinks for the user. Sincce typically Hyperlinks are too big to show in a DataGrid cell, I need to have the column width at max 100px to be able to fit other columns in the Grid.
    What I am looking for is a way to show content of the cell when the user mouse over the cell. May be when user rollover, the cell shows the content increasing its size overlapping on the adjucent cells.
    Can anyone pls give me some suggestion on this? a code snippet would be very helpful if possible...
    Thanks in advance, Bose.

    Hi
    Instead of enlarging a cell you can display data using showDataTips="true" for the respective column.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:mx="library://ns.adobe.com/flex/mx" layout="absolute" minWidth="955" minHeight="600" applicationComplete="initData()">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                private var DGArray:Array = [
                    {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99},
                    {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99}];
                [Bindable]
                public var initDG:ArrayCollection;
                public function initData():void {
                    initDG=new ArrayCollection(DGArray);
            ]]>
        </fx:Script>
        <mx:DataGrid id="myGrid" dataProvider="{initDG}" >
            <mx:columns>
                <mx:DataGridColumn dataField="Album" dataTipField="Album" showDataTips="true" />
                <mx:DataGridColumn dataField="Price" />
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>

  • Is there any way to tell which formulas a particular cell is in, reverse look-up style? That is, is there a way to search somehow for which formulas in a sheet contain a particular cell in them without opening all of them up? If not, it would be nice

    Is there any way to tell which formulas a particular cell is in, reverse look-up style? That is, is there a way to search somehow for which formulas in a sheet contain a particular cell in them without opening all of them up? If not, it would be nice.
    I'm fixing a Numbers document that I use in business daily that's become overly complicated, but while I want to clear/delete a number of cells in it to clean it up, I'm not sure if those cells are being used as source for other formulas on the page. I don't have to open all my formulas one by one to see if that cell is in there, do I?! That'd be a huge amount of work if I wanted to eliminate say 10 cells to search each formula on the page to see if it is in there or watch all the cells when I delete that cell to see if the numbers change! There's got to be an easier way! Right click doesn't seem to be any help.
    I don't want to damage my daily tool to make it cleaner and reorganize it. Is there really no way to do a reverse look-up of which formulas a particular cell is in?! Any time I click on a formula it highlights all the CELLS in that formula. Why can't I (or can I?) do the reverse and see all the FORMULAS that contain a particular cell?
    As a Numbers document ages or gets used frequently, you can sometimes forget which cells are tied to which formulas. You just look for the results of your formulas. Would be a nice thing to be able to do. Thoughts? Work-arounds? Answers?

    Answer would be no unless application provided such feature. Numbers does not as far as I know.
    Note that even if you have complete list of formulae used in a table, identifying formulae referencing any given cell is not simple.
    E.g., cell T20 is referenced not only in
    =T20+1
    but also in
    =SUM(T)
    =SUM(20:20)
    =SUM(S19:U22)
    =OFFSET(S1,19,1,1,1)
    =INDIRECT("T"&(10*2))
    In order to identify such formula, we have to actually evaluate it to see if it references the given cell. Especially such formula as OFFSET() and INDIRECT() may not be found by static parser because their parameters can be dynamic.
    Sorry to be the bearer of bad tidings.
    H

  • Is there any component which returns similar to cell information in a table

    Hi,
    I need to display information on my dashboard with a spreadsheet table. when users clicks on a particular cell, i need to capture which cell they have selected and pass to a webi report. The spreadsheet table has position and row as selectability types.
    Can anyone please let me know wether there is any other way out for this, or is there anyother component which can solve my problem? Displaying data in tabular format and i would like to know what has been selected a single value.
    Regards
    J

    Hi BLtechie, 
    If you are ok with using VBA (precluding the workbook from functioning correctly within SharePoint in an Excel Web Access web part) then you should be able to adapt the solution here: 
    http://www.mrexcel.com/forum/excel-questions/525495-conditionally-show-hide-charts.html
    Alternatively, if you have a tabular model and access to SharePoint 2013 with Reporting Services Integrated mode running SQL 2012 SP1 CU 4 or higher you could instead create a power view report that used the pinned filters property and simply presented
    each of the pivot charts on named sheets (forming your user's selection choice). 
    http://blogs.msdn.com/b/riccardomuti/archive/2013/05/24/pinning-filters-in-power-view.aspx
    Hope this helps, 
    Mike

Maybe you are looking for

  • Error While doing settlement for Sale Order in MTO scenario

    Hi, In MTO Scenario - when i try to settle Sales Order i am getting the below error. Even i have maintained the settlement cost element for PSG in allocation structure A1. Kindly help me Define a settlement cost element for receiver type PSG Message

  • How to insert into collection type of objects?

    Hello, Can any one help with the follwoing code below,where i cant insert into an instance of the table type within the pl/sql block. create type courselist is table of varchar2(25); create type student as object (name varchar2(20), courses courselis

  • Collection of reference workflow models in SAP R/3 for research

    Hi, within SAP R/3 (at least in version 4.6c) there must be a collection of reference workflow models modeled as EPCs that can be exported e.g. with ARIS Toolset for SAP NetWeaver. These models were used for some research about process metrics in the

  • Why does update to Firefox 3.6.3 not uninstall 3.6.2?

    Manually used Help | Check for Updates, and "Software Updates" window to download and install Firefox 3.6.3 over 3.6.2. After 3.6.3 was installed, Windows XP "Add or Remove Programs" window lists both "Mozilla Firefox (3.6.2)" and "Mozilla Firefox (3

  • Media cache files...

    Hi I have a folder on my C-drive under application data\adobe\common\ called "media cache files". There is a huge amount of data in that folder. Can I put it somewhere else, and is it safe to empty it once in a while? Thanks. /Ulf