Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-03-2004, 01:46 PM   #1
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,

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

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
Registered User
Join Date: Jan 2005
Posts: 11

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
Registered User
Join Date: Dec 2004
Posts: 5

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

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 07:39 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.