Accessing data from a List item on mouse over

Below is a short example in Flex on how to access data from a list item on mouse over. I’m using the rowIndex property of itemRollOver event to access the index at which the mouse is currently positioned.

<?xml version=”1.0″?>
<mx:Application xmlns:mx=””>

		    var oceans:Array = &#91;"Pacific", "Atlantic", "Indian", "Artic", "Southern"&#93;;
		    public function displayItem(event:ListEvent):void {
		    displayTxt.text = displayList.dataProvider&#91;event.rowIndex&#93;;

	<mx:List id="displayList"
		itemRollOver="displayItem(event)" />

	<mx:TextArea id="displayTxt"/>

Tagged ,

5 thoughts on “Accessing data from a List item on mouse over

  1. Abhay K. says:


    Its a great solution,
    thanx for this wonderful solution

  2. ravisankar says:

    verygud posting

  3. Andy says:

    Nice. Glad to come upon your post.


  4. Jaydeep Tank says:

    How Will i get rendered value instead of Dataprovider value. I have used renderer for columns

  5. Sophi says:

    Hi, its a great solution for Menu Item list. Do you know if we can get the same functionality, when user puts his mouse cursor on a folder in sharepoint, so that it gives the text list of items inside it??

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s