Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-03-2004, 01:46 PM   #1
JRBT
homeslice extraordinare
 
JRBT's Avatar
 
Join Date: Dec 2001
Location: East Side
Posts: 130
Default Getting the text value of a DataGrid cell

Hi everyone!

I have a quick question about the DataGrid.

I realize that getSelectedIndex() will return the ID of the row in focus on the grid, but how do I get the text value of a focused cell within the row?

Thanks in advance,

Joe
JRBT is offline   Reply With Quote
Old 12-16-2004, 11:53 AM   #2
sandhyanayak
Registered User
 
Join Date: Dec 2004
Posts: 1
Default

Hi Joe!

Just write this event handler and change the instance of the grid as per ur convienent and see what will dispy it.

myListener.cellPress = function(event)
{
var colName=mcGrd.getColumnAt(event.columnIndex).colum nName
var cellValue=mcGrd.selectedItem[colName]
trace("cellValue: "+cellValue)

};
sandhyanayak is offline   Reply With Quote
Old 01-06-2005, 03:33 PM   #3
dwalsh9x
Registered User
 
Join Date: Jan 2005
Posts: 11
Default

I do it this way, which seems a little more straightforward.

ActionScript Code:
myDataGrid.addEventListener("change", myDataGridChange); function myDataGridChange(eventObj:Object):Void {     myTextArea.text = myDataGrid.selectedItem.ColumnName; }
dwalsh9x is offline   Reply With Quote
Old 01-08-2005, 08:30 AM   #4
zhier81
Registered User
 
Join Date: Dec 2004
Posts: 5
Default

dwalsh9x:you don't get the text value of the selected item!
zhier81 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:56 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.