How to keep track of the last selectedItem in datagrid?

Hi all

I use Flex 4 and an AdvancedDataGrid.  I need to keep track of the previously selected item.  I can't think where this good capture.  In an itemClickHandler method, the value of the selectedItem of the grid is already the element currently selected.

FocusIn and Focusout/focusouthandler() attributes apply to the entire data grid, not the single line in the datagrid control.

Thank you.
Bonnie

If I understand what you're asking correctly:

based on the story how 'clicks', you simply store the index selected in an arraycollection collection.

If you only need one. use 2 variables. One to store the current index and the other to store the previous.  And 'click' call a function that moves the current index in the previous. and the new current index of slected.

If your 'click' has already done something else, just make a wrapper function that incorpates the copy of the index of the clicked and then done everything what you need.

something like that... If you insert data in the ADG it should show something other than-1

////////////////////////////////////////////////////////////////////////////////////////// ///////////////////

<>

xmlns:MX ="http://www.adobe.com/2006/mxml" layout = "absolute" > "

Import mx.collections.ArrayCollection;

[

Bindable]

private var history: collection ArrayCollection = new ArrayCollection();

[

Bindable]

private var last: int;

[

Bindable]

private var current: int;

private function recordHistory():void {}

last = current;

current = adg1.selectedIndex;

//***//

history.addItem (adg1.selectedIndex);

}

]]>

////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////

Tags: Flex

Similar Questions

  • How to keep track of the answers of the quiz of the learner? cpQuizInfoAnswerChoice?

    I want to keep track of the responses of the learner throughout of a quiz, so that at the end of the quiz I can provide feedback on what topics need futher study (topics related to issues they are is wrong). I think that the system variable that contains this information is 'cpQuizInfoAnswerChoice', but how I call it for each of the individual issues? Help!

    You will need just to another variable of system: cpQuizInfoLastSlidePointScored and as cpQuizInfoAnswerChoice, it is a variable that changes its value after each slide of the question, you so need once again user variables to store and identify the score for each slide.

  • How to keep track of the lines that I add to a table so that I can update more later or remove them?

    A > the form has a set of field and text dropdown list entries.  After the user updates the data in a specific text, change field, I need to add their data to a table on the first time through.   There are many different games of entries that would each have their own line.

    B > later the user comes back and changes the data in a field.  I need to update this specific line with the new values.

    C > later the user returns and removes the data of one of the fields completely so I need to remove that specific table line.

    D > the user does not directly from the table.  The table summarizes the entries that are made in the text and drop-down list fields.  I need to be able to maintain the table in harmony with user input.

    I agree with the addition of rows in a table, but I do not know what's best for that lines are kept synchronized.   I've got a good amount of Java programming experience under my belt, but I have a few projects in LiveCycle.

    I'm quite willng to read if you have any reference material online for the management of dynamic arrays.  So far, the only information I have found is how to add and remove lines, but not how to keep track of them.

    Any help is greatly appreciated.

    Ah sorry missed that you do not use two tables.

    Do you use Extensible lines or is there a specific line for each set of data?

    You can just hardcode where data are intended - a data go into RowA. To the same output of the field, you would be just: table.rowA.rawValue = this.rawValue;

    You can use Global binding on the fields: the fields, take data entry have the same name as the fields in the table and then automatically updated data.

    For blank lines, you will need to check if there is data in the fields and if no data you can hide the line: RowA.presence = 'hidden ';

  • App - test available, you can keep track of the health

    Is there anyway to add a new test that you want to keep track of the application?  Some test results important for certain medical contains are not available, and I want to add and then on my dashboard.

    Thanks for the help!

    No, not for the moment.

    Comment asking this feature here:

    http://www.Apple.com/feedback

  • Stolen phone. How can I check when the last time saved my phone to my laptop (without my iphone of course)?

    My iPhone was stolen. How can I check when the last time that I backed up my phone to my laptop without my iPhone?

    Click here and either use iTunes to check or browse to the path of the backup manually.

    (142338)

  • I've recently upgraded to El Capitan - biggest problem is timing removed all the entries in my previous ical. Any ideas how I can track down the file containing these essential documents and install in the new program?

    I've recently upgraded to El Capitan - biggest problem is timing removed all the entries in my previous ical. Any ideas how I can track down the file containing these essential documents and install in the new program?

    All calendars are enabled in the sidebar?

  • Urgent! How to open one of the last update of the project in an earlier version first?

    How to open one of the last update of the project in an earlier version first?


    I can't open a project that was saved in the latest version of first. My version is earlier than that of the project that have been saved

    Hello

    So far, backward compatibility is not available in Premiere Pro.

    Export your project as a FCPXML of the new version of first and try to import in the previous version.

    Kind regards

    Ilyes Singh

  • How to keep or make the area outside the transparent cutting tool. Mine is white

    How to keep or make the area outside the transparent cutting tool. Mine is white

    You should find the forum for any product it is and post your questions there.

    Here is a link to a page that provides links to all of the Adobe forums...

    The Forum links page: https://forums.adobe.com/welcome

  • How to place my following the last version adobe software if I have the serial number and the CD, but my computer (Macbook Pro) lacks a CD player?

    How to place my following the last version adobe software if I have the serial number and the CD, but my computer (Macbook Pro) lacks a CD player?

    You can download the installation files and use the serial number of the drive.

    CS6 - http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html

  • keeping track of the tablespace growth

    Hi all

    10g on solaris 10


    We want to keep track of the tablespace growth in our production database?

    Any idea hw to do this?


    Kai

    Better to keep the data in a table of data instead of the old email so you can find and process.
    Best database dbms_scheduler than cron schedule.

    for example, something like
    create table xxx_datafile_history (date of collect_date, varchar2 (30) nom_tablespace, whole file_id, number of bytes).

    -can schedule a monthly job to do the following: -.

    Select sysdate into double currdate;
    insert into xxx_datafile_history select currdate, nom_tablespace, file_id bytes from dba_data_files;

  • How to keep track of book audio streamed files?

    I am a new Sansa Clip + 4 GB user.  I formatted my Clip + and put into MSC mode.  I inserted a microSDHC card in the Clip +.  The microSDHC card has a folder with about 20 files that have the kind of "AudioBook".  Everything works and I am able to listen to the files, stop listening and resume listening later where I left.

    My question is what is the way to keep track of each audio file that is already registered to?  I navigate to the files by going to:

    Music > records > uSD external card > FolderName > list of all the files of audio books.

    Say that I listened to the first 4.5 files.  Next time I want to listen to audio books, I don't remember going to audiobook 4 resume listening.  How do you remember which audiobook file to resume listening?

    Thank you

    Skyglider

    If you tag your audiobook files properly, so that all the audio files for the same book have the same name of the album and are numbered sequentially (make sure you use zeros, ie. 001, 002, oe else you could start their numbering from 101 if you want to avoid having to use zeros, and less than 900 files are in the audio book. If you have configured this way, then when you go into the menu of audio books, the player will guide you to the audiobook and file audio book that you played last.

  • How to fade Audio in the last version of Adobe first CC

    Since the last update, I don't know how to fade the Audio without keyframes. In previous Versions, I could click on the small arrow to set some Points to fade audio. Can someone explain to me how do it with the latest version. TY and cheers.

    You must expand the track. Look carefully at the first screendump I did.

    Place your mouse on the track header and scrolling.

  • left-click on the icon of firefox in the taskbar displays a list of all the tabs. How to open just to the last tab?

    I use the tab grouping feature a lot. It means that I have 100s of tabs open at any time.

    The problem: once a switch between tab groups, the Firefox icon in the task bar changes in what looks like multiple echoes of the Firefox icon. I guess this is supposed to represent several groups of tabs.

    Before the 20th of Firefox might click on the Firefox icon in the taskbar, and would come to the top and show the last tab, I worked on Firefox.

    Since Firefox 20 a left click on the Firefox icon in the task bar now displays a list of the 28 tab + seemingly random tabs. Many of them said only: "Mozilla Firefox" instead of the site represented by this tab (because the tab has not been accessed recently).

    To open Firefox to the last tab, that I worked on is now a real chore. I now have to choose one of these tabs 28 + (which is 99% of the time the tab bad), then switch to the Group of the appropriate tab and then find the tab I've worked on. It usually takes 5-10 clicks to get back to where I was before I've minimized Firefox, or before that Firefox has lost focus. (In the past I could simply click on the Firefox in the taskbar, and restored Firefox icon where I left last.)

    How can I disable the list that is displayed when a left click or move the mouse over the Firefox icon in the taskbar? I would like the ability to minimize/restore Firefox by clicking on the Firefox icon in the taskbar, as it was in the past, do not get a choice of random tabs.

    I think that I thought about it. Under OPTIONS > OPTIONS > TAB, uncheck the box for "Show glimpses of tab in the Windows task bar" and then click OK

  • Keep track in the scroll view

    Hey guys!

    I was not able to find the right way to describe what I want to do, so my research is not leading to any useful information.

    In any case, I'm trying to find a way to "lock" a track so that it is ALWAYS visible in the arrange window, not to be confused with the gel or the locking of the smpte. For example, I have a dialogue or a temp range, that I very often of reference, and it's a pain to have to keep scrolling all the way to the top (where I keep) and return to the track, I work with (my sessions contains 48 + titles so constantly scrolling up to the top solo and/or put mute the dlg or mx track becomes a killer of great workflow).

    So if there is a way to lock a track/area/line so that it is always there no matter where you highlight (a bit like a row/column of locking in a spreadsheet/treatment) I still have to find...

    Any ideas or suggestions are MUCH appreciated-

    Thank you!

    On suggestion would be to use the hide feature followed in order to ensure the reference track remains visible as well as the follow-up of these tracks, you are working with, while others are hidden... below the Piccolo is the reference... You can also use keyboard shortcuts to speed up the workflow.

  • How to restore back to the last screen of 6.22 horrible blue boxes GUI?

    Dear Skype/MS

    How to give an option under 'options' to return current return clutered unreadable-blue boxes to large message readable clean free of old clutered white screen?

    Does anyone know how reveret return of this unreadable thing Blue-Box without having to reinstall the older version of Skype that were easier to easy to read?

    Thank you

    You don't have to bother the penalty...

    I rolled Skype back to a readable-friendly version of Skype 6.20.0.104 for some bugs there... it is certainly much better than the last horrible version 6.22 with unreadable user interface. Thank you

Maybe you are looking for

  • Covers satellite U940 - 11 d (PSU6VE) with two HARD drives - how to remove?

    Hello world I bought new Samsun Evo SSD and I tried to replace the HARD drive, but I could not open the cover of the hard drive.Please give me pdf document, what is the procedure to replace the hard drive. This model stands out for another model of U

  • Drivers HP flow 8 Windows 10

    Hello I just updated my HP flow 8-10 Windows and using its only basic drivers and display performance is really bad. No acceleration at all. Can I use Windows 8.1 drivers? When will Windows 10 drivers available? I tried install the Intel update utili

  • Unable to reinstall my XP Pro original cd, windows says its not legitimate.

    Due to a bad virus, I had to reinstall my Windows XP Pro and now I can't activated because it says that its not legitimate.  I've had this since XP came out and had an XP update cd that has been stollen from me but I still have the original xp cd.  S

  • (Redirected) Another owner of mixed open-box Best Buy who require assistance to transfer

    A few months ago, I bought a laptop from Best Buy. It was a mixed open-box item that was apparently recorded by the former owner. Some of the equipment is faulty, so I need support, but cannot get help because I'm not the owner. After I bought it, I

  • CRUCIAL QUESTION - BETA ZONE DELETED?

    Once connected to https://developer.blackberry.com/beta I get redirected to https://developer.blackberry.com/beta/isv/ without app program listings. I can't access the previously accessible app management console. It is a crucial issue for me. Since