How do I get itemDoubleClick event in spark DataGrid ???

Hello Everyone,
Recently I am working with Spark DataGrid.
Before I was using AdvancedDataGrid. In that I was capturing itemDoubleClick event.
But I am not able to find such a event in SparkdataGrid.
So I want to capture double click event on single row of DataGrid.
Some people told that, I have to use my custom ItemRenderer to do that.
But is there any way to capture itemDoubleClick event in Spark DataGrid without creating custom ItemRenderer ???

You are correct.  I looked a the code and the comment says it dispatches a double click if the 2nd click is within the  DOUBLE_CLICK_TIME even if the first click was on another cell.
This code figures out if the double-click is a true double-click.
<?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">
    <fx:Script>
        <![CDATA[
            import spark.events.GridEvent;
            private var lastColumnIndex:int = -1;
            private var lastRowIndex:int = -1;
            // set this to change the double click time   
            //mx_internal::event.grid.DOUBLE_CLICK_TIME = 480;  // ms
            protected function dataGrid_gridClickHandler(event:GridEvent):void
                trace("click on this cell", event.rowIndex, event.columnIndex);
                lastRowIndex = event.rowIndex;
                lastColumnIndex = event.columnIndex;
            protected function dataGrid_gridDoubleClickHandler(event:GridEvent):void
               if (event.rowIndex == lastRowIndex && event.columnIndex == lastColumnIndex)
                   trace("a real double click on this cell", event.rowIndex, event.columnIndex);
               else
                   trace("this is a gridClick on another cell", event.rowIndex, event.columnIndex);
               lastRowIndex = event.rowIndex;
               lastColumnIndex = event.columnIndex;
        ]]>
    </fx:Script>
        <s:DataGrid id="dataGrid" requestedRowCount="5" verticalCenter="0" horizontalCenter="0"
                     doubleClickEnabled="true"
                      gridClick="dataGrid_gridClickHandler(event)"
                      gridDoubleClick="dataGrid_gridDoubleClickHandler(event)">
            <s:ArrayCollection>
                <s:DataItem key="1000" name="Abrasive" price="100.11" call="false"/>
                <s:DataItem key="1001" name="Brush" price="110.01" call="true"/>
                <s:DataItem key="1002" name="Clamp" price="120.02" call="false"/>
                <s:DataItem key="1003" name="Drill" price="130.03" call="true"/>
                <s:DataItem key="1004" name="Epoxy" price="140.04" call="false"/>
                <s:DataItem key="1005" name="File" price="150.05" call="true"/>
                <s:DataItem key="1006" name="Gouge" price="160.06" call="false"/>
                <s:DataItem key="1007" name="Hook" price="170.07" call="true"/>
                <s:DataItem key="1008" name="Ink" price="180.08" call="false"/>
                <s:DataItem key="1009" name="Jack" price="190.09" call="true"/>            
            </s:ArrayCollection>
        </s:DataGrid>
</s:Application>

Similar Messages

  • How do i get my events to change colors when i add new ones in my calendar

    How do I get my events to change colors when I add a new event in my calendar?

    When you add an event and you see the heading "Calendar", do you see a name to the right of it such as "Work"?  If you tap on the heading "Calendar" does it show you a list of calendars?
    I'm basing this on my experience using iCal on a Mac to sync with my iPad.  I created a number of calendars on the Mac and assigned them different colors.  Those appear on my iPad.  I don't know how to create additional calendars on the iPad alone - I must create them in iCal or MobileMe then they show up on the iPad.  Are you using a Mac or MobileMe?

  • How can I get the events from a java program?

    I want to make a monitor to watch a java program.How can I get the events from the GUI of this program some as mouse cliking, keyinput. So I can watch these in my monitor.
    Thanks

    Hi,
    To put a monitor to the events occuring in the GHUI u need to register required components with the appropriate EventListeners.
    Liek if u want to get notified when a mouse is clicked, then u need to add The MouseListener to the component which u want to be monitored.
    Say
    myFrame which is the JFrame object which shuld be monitored for the events.
    Then in ur program u have to add following code
    myFrame.addMouseListener( someObectReference );
    Here the someObjectReference should be an instance to a concrete class ..i.e. U write a class like the following
    public class MyMouseListener implements MouseListener {
    // override the followig methods
    public void mouseClicked(MouseEvent me){ sop("MOUSE CLICKED ON THE FRAME");}
    public void mousePressed(MouseEvent me){}
    public void mouseReleased(MouseEvent me){}
    If u dont want to use another class for listening to the events. Then u can make teh current class monitor the events. To do so ur class should implement the appropriate listener and should override the required methods.
    and u should say myFrame.addMouseListenet( this );
    thats it

  • Calendar help: how do I get One event to show up on two calendars

    Calendar help: how do I get One event to show up on two calendars? For example I want to enter vacation only once but I wanted to show up on the calendar that I share with my husband and the calendar I have with my assistant.

    The signature should show up with each account. Usually the complaint is not having an option for multiple signatures or not being able to have a different signature for each account.

  • How do I get new events on my phone to sync with my desktop ical?

    How do I get new events on my phone to sync with my desktop ical?

    Hello juliebgerstel,
    I read your post, and it sounds as though you'd like to learn about calendar syncing. I have linked to an article that will instruct you on how to do that:
    iOS: How to transfer or sync content to your computer
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • Upgraded to ios 7.1 battery drain is significant and have lost my calendar events. how do i get my events back and why am i losing so much power now?

    how do i get my calendar events back and why the power drain after upgrading my operating system to 7.1?

    Thought I'd reply to this seen as no one else has, I am also experiencing very similar problems with my 4s and by the looks of it is it's across all handsets. I've never had any battery issues with my iPhone even 7.0.6 was fine, but since updating to 7.1 the battery is ticking down very fast. I fully charged in the morning and left it in my locker all day at work when I got my hands on it it's gone down to 52% just on its own!!
    I really hope they sort this out fast the irony is 7.1 was supposed to help battery life!

  • Accidentally merged all iPhoto events. How do I get my event data back?

    I accidentally merged my iPhoto events all into one event. I'm using iPhoto 11 on Yosemite. My problem is, my last backup to my external hard drive was in April 2014 (I know, my fault). Is there a way to restore the events? I notice in the metadata there are event files that date up to April 2014. Can I use these to restore the events? I realize I might not be able to get the events from April 2014 onward restored. But is there a way to at least restore the events created prior to April 2014?
    I'm not really sure how all the metadata and backup files work so any help is appreciated.

    Well no one has ever found a way.
    Try rebuild with iPhoto Library manager.
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.

  • How can I get the event triggered in the WDOBEFOREACTION of my View?

    I have a custom WDA inserted into an SAP FPM.
    I need to find out whether the user just hit <Enter> or actually chose an FPM button such as Read Only.
    How could I find out the FPM event in my View?

    In my opinion, you would not get FPM events in your view. FPM events are handled in the controllers method like process_event.

  • How do I get the event / text to show on my calendar?

    In my calendar, when on the day, the text / event is not showing and it used to.  If I click on it, it's still there but I want the event to show at a quick glance.
    How do I get that back?

        Hello DWarmke
    I'm very sorry your having calendar issues. Let's see if we can get this fixed the reminder time may have elapsed. Here's a great link: http://vz.to/1q2k4vJ Try deleting the event and readding.
    Sincerely
    JoeL_VZW
    Follow us on Twitter @VZWSupport

  • How do you get the Event folder date to match the media dates in FCPX

    Modifying the clip date/time with the Modify command works fine ... but the Event itself still has the date the event was created, not the date of the media that it contains.
    If tried using Touch on the Event folder but FCPX ignores it.
    Any ideas on how to get the Event folder date to match the media dates (or set to any other date desired) so that Events sorted by date show the actual dates of the media that they contain?
    Thanks
    Jonathan

    Here is the texture I've been manipulating  all afternoon to try and achieve the looks i want.
    and when I put this texture over the top of other images and select Multiply, and adjusted the opacity, this is what i get....
    Now this kinda works?? but it still looks not as good on an asian person.
    Thanks by the way to everyone for all the tips, I really really appriciate it   and more suggestions for improvments are welcome!

  • How  can i get the event of selected PageItem in ActionScript

    hi,
    when i select the pageitem on document then i want the event of that pageitem .
    Is there a possibility to get that event ?
    best thanks for any hint.
    govind

    Marcel,
    Please consult the "Tables" chapter in the UIX Developer's Guide. You can search for a method titled "doSelectionEvent" that will indicate how to deal with table selections.
    Hope this helps,
    Ryan Pollock

  • How to change header font style in Spark DataGrid?

    I'm looking since last week for a way how to change the font style of the header in a Spark DataGrid. It drive me nuts that I can't find a way to do this. Have anyone one an idea how to achieve it? Any help is appreciated.
    Thanks,
    - Artur

    Hi,
    Some styles won't work because some text styles got hardcoded into the DefaultGridHeaderRenderer's Label. You'll run into this issue not just with the DataGrid headers but also things like the Panel's title and other places where we have text. One way to get around this issue is to create your own custom headerRenderer based on the default one and then redefine the headerRenderer skin part in the skin.
    First, create a subclass of the DefaultGridHeaderRenderer and tweak the "labelDisplay" to your liking (or even just take out all the styles and style it on your own as you had earlier using your custom header renderer's name). Example below (I named it "CustomHeaderRenderer"):
    <?xml version="1.0" encoding="utf-8"?>
    <skins:DefaultGridHeaderRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     xmlns:skins="spark.skins.spark.*"
                                     xmlns:comps="comps.*">
        <fx:Declarations>
            <!-- Remove fontweight="bold" and other styles as you wish
                 Must be a component and not a factory. -->
            <s:Label id="labelDisplay"
                     verticalCenter="1" left="0" right="0" top="0" bottom="0"
                     textAlign="start"
                     verticalAlign="middle"
                     maxDisplayedLines="1"
                     showTruncationTip="true" />
        </fx:Declarations>
    </skins:DefaultGridHeaderRenderer>
    Next, create a simple DataGrid skin by creating a subclass of the  spark.skins.spark.DataGridSkin in MXML and defining a new headerRenderer  component in the fx:Declarations section. Example below (I named it "CustomDataGridSkin"):
    <?xml version="1.0" encoding="utf-8"?>
    <skins:DataGridSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    xmlns:skins="spark.skins.spark.*"
                    xmlns:comps="comps.*">
        <fx:Declarations>
            <!-- Must be a factory with the right id for the skin part -->
            <fx:Component id="headerRenderer">
                <comps:CustomHeaderRenderer />
            </fx:Component>
        </fx:Declarations>
    </skins:DataGridSkin>
    Last, assign your new skin as the skinClass of your DataGrid (either in MXML or as a style):
    <s:DataGrid skinClass="comps.CustomDataGridSkin">
    I know it's not pretty, but it's the result of trading off between having completely custom skinning vs. having knobs to tweak every style. Hope this helps.
    -Kevin

  • Column stretch event in spark datagrid

    Hi everybody,
    These days I'm converting our Flex application from Flex 3 SDK to Flex 4.5 SDK (Hero).
    I've a problem with the spark datagrid, and more specifically, the events listening on the columns.
    How can we know that the columns in the spark datagrid are stretched or shrinked?
    In Flex 3, there was a DataGridEvent.COLUMN_STRETCH event on the datagrid and I can't find the equivalent in Flex 4.5.
    If you have any tips.... thanks!!!!

    When a GridColumn is interactively resized "widthChanged" events are dispatched because the column's width property is set.   To track the entire column separator press-drag-release gesture you can listen for GridEvent.SEPARATOR_MOUSE_DOWN,SEPARATOR_MOUSE_DRAG, etc..events on the DataGrid's columnHeaderGroup skin part.   If you wanted to change the way the interactive column resizing works you'd have to subclass DataGrid and override protected methods like separator_mouseDownHandler(event:GridEvent), separator_mouseDragHandler(event:GridEvent).
    - Hans

  • How can we get save event at Photoshop shutdown?

    Hi All!!
    I have to perform some actions on the save event of a document. I had no problem in doing the same. But, during testing different save event trigger scenarios, I came across the a situation in which an untitled document is open and the user closes Photoshop. At this point Photoshop prompts the "Do you want to save document?" message. Regardless of the user selection ("Yes"/"No"), the plugin is unable to get the save event, possibly because of application shutdown. I get the kSPInterfaceShutdownSelector message directly. No stop at the save event callback.
    How can I ensure that my save event callback is executed everytime a user saves a document?
    Thanks!

    Hi Ilya,
    I put in event listeners for close event, save event. I receive a call at the close event call back function. There I tried to get the saved document name, but I get none since the document has been closed. I need the saved document name to do my work. After the close event call back function, the call goes straight to shutdown plugin. The save event callback is missed totally. Why is this being done?
    The same is being done if I close an unsaved document without closing Photoshop. I am presented with a "Do you want to save?" prompt. If I choose "Yes", then the plugin just receives a call at the close event callback. No call received at the save event callback.
    What can I do?

  • How do I get an EVENT saved on a flash drive?

    I have exported my projects and imported them again to make them events so they could all be put together for one long video.  When I play it back, it plays perfectly just as I wanted it to.  The problem now, is that I don't know how I can save it to a flash drive. :/  Any help would be great!
    RCallaham

    Just create a new project and select the whole video clips in that event to this project for output.
    How to select the whole video clips: Press Shift + right click on one video clip and choose the option: Select Entire Clip.
    Hope it helps. Note: the output must be in Project but not Event.

Maybe you are looking for

  • Dynamically catch a function call from an object at runtime

    Hi, I have a bit of an interesting question. Say I have a dynamic object named Foo. It may have a set of explicitly defined functions: public function helloWorld():String      return "hello world"; public function get name():String      return "My Na

  • Calendar list view and search go back only 1 year

    I have a new iPhone 4S (IOS5).  Calendar List view shows entries only back to a year ago, yet Day, Month and Week views show all my entries going back to Oct 2008.  Perhaps related:  the monthly views in Reminders also go back just one year.  A frien

  • Backup Crashes

    I'm running Elements Organizer 8.0.0.0 Core Version: 8.0 (20090905.r.605812) Language Version: 8.0 (20090905.r.605812) Current Catalog: Catalog Name: My Catalog Catalog Location: E:\My Catalog\ Catalog Size: 61.1MB Catalog Cache Size: 312.6MB System:

  • Value Mapping Replication from BPM

    Hi, I'm trying to maintain some value mapping replication data from a BPM. Based on certain steps and their results, a Value Mapping Replication message is sent from BPM. I configured the the receiver as XI system and used the XI channel with java pa

  • Difference in Triggers for populating Primary Keys

    version: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production Hello, I have a question regarding using Triggers to populate Primary Keys. One Trigger I've seen written like this: CREATE OR REPLACE TRIGGER "BI_MY_TABLE"     BEF