Solved

Flex::issues with Getting Data of Selected item

Posted on 2009-05-06
2
471 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
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Flex organization chart 5 613
How popular is Java FX these days? 5 352
Flash builder 101 tutorial 3 432
[HELP PLEASE] -- calc columns in datagrid 13 478
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…
If you thought ransomware was bad, think again! Doxware has the potential to be even more damaging.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

825 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