Solved

Flex::issues with Getting Data of Selected item

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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
flex remote display image 7 388
labelFunction 3 282
Flex Adobe Flex Connector for MS SQL Server - calling stored procedure with parameters 3 1,241
Adobe Experience Manager 4 213
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…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

696 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