Solved

Flex::issues with Getting Data of Selected item

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

19 Experts available now in Live!

Get 1:1 Help Now