Solved

Flex::issues with Getting Data of Selected item

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

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…
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

919 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now