Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Flex::issues with Getting Data of Selected item

Posted on 2009-05-06
2
Medium Priority
?
495 Views
Last Modified: 2012-05-06
I am working Flex 3.0 and getting some dynamic data that I am feeding to a datagrid. I need to pass the selected items from Flex's data grid back to Database to query depending on the user selection. I am getting [object Object] as the selection. How can I get the EMP-FNAME selected as string and not as an object.
<mx:DataGrid id="EmpNameDataGrid" itemClick="onItemClick(event)" width="200"  dataProvider="{hsEmployeeNames.lastResult.employees.employee}">
				<mx:columns>
					<mx:DataGridColumn headerText="EMP Name" dataField="EMP-FNAME" />
				</mx:columns>
			</mx:DataGrid>

Open in new window

0
Comment
Question by:prasanna051400
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Expert Comment

by:zzynx
ID: 24318771
How does your onItemClick method looks like?
0
 

Accepted Solution

by:
prasanna051400 earned 0 total points
ID: 24322456
I solved the problem by going through the API, I was trying to figure out how the findString method on Datagrid works and ran into a method called itemToLabel.

DataGrid.itemToLabel(DataGrid.selectedItem)) -> returns the String of the Object selected that gets sent in as a parameter to the ItemToLabel method. Thanks zzynx for your time and comment. Appreciate it.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This week I attended a Startup Week Chattanooga talk on Gender Diversity in Technology. Check out what I learned.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question