Welcome to GraphicForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

DataGrid - selecting, highlighting, navigating to a row

 
   Graphic Forums (Home) -> General Discussions RSS
Next:  xml data loads but does not always trigger xml.on..  
Author Message
stjulian

External


Since: May 24, 2006
Posts: 4



(Msg. 1) Posted: Thu Jul 06, 2006 1:57 pm
Post subject: DataGrid - selecting, highlighting, navigating to a row
Archived from groups: macromedia>flash (more info?)

(I thank you all for your help, this is the third post, I'm desparate for a
solution...)


In Flash MX 2004

I would like to have a row selected after the DataGrid has been populated.
Much like a list box <select> in html, I would like to make one row
"selected". It must be navigated to and highlighted to visually indicate the
selection.

However, the focusedCell property does not work when dg.editable=false

So, I set the dg.editable=true, set the focusedCell to the appropriate row
and cell then set the dg.editable=false. But this left the chosen cell in an
editable (textbox) state that you would have to click out of in order to see
all the contents of that cell. Ugly.

With the fine suggestion of DMennenoh, I used the .selectedIndex property to
choose the selected row, but, although the item is in fact selected, the
datagrid does not navigate to the selected field. It stays on the first row.
You must scroll through the list to see the selected row.

Also, dan mode suggested dg.setSelected(0) where I supplied the appropriate
index, but the navigate does not happen.

Is there a way to progarmmatically choose and navigate to a row in a
DataGrid without this effect?


At this point, I will even accept a way to programmatically "hit enter" to
allow the focusedCell function to end the edit mode on the cell.


Julian

 >> Stay informed about: DataGrid - selecting, highlighting, navigating to a row 
Back to top
Login to vote
takennickname

External


Since: Jul 06, 2006
Posts: 6



(Msg. 2) Posted: Thu Jul 06, 2006 3:55 pm
Post subject: Re: DataGrid - selecting, highlighting, navigating to a [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You may need to add a listener to the .selectedIndex so Flash can know when a change has occurred, and when it becomes positive by an entry or being prompted to hit Enter, it is activated.

K.

 >> Stay informed about: DataGrid - selecting, highlighting, navigating to a row 
Back to top
Login to vote
stjulian

External


Since: May 24, 2006
Posts: 4



(Msg. 3) Posted: Thu Jul 06, 2006 3:55 pm
Post subject: Re: DataGrid - selecting, highlighting, navigating to a row [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you for your response.

I am assuming from your idea that my use of focusedCell is on the right
track. If so, how do I end that edit mode? I see an onKillFocus event, but I
do not see a KillFocus method for DataGrid in the dictionary.

What method/function is to be used to end the edit mode programmatically?

Do you have a small code example of this to go into the listener event?

Julian

"takennickname" <webforumsuser.RemoveThis@macromedia.com> wrote in message
news:e8jkjv$5al$1@forums.macromedia.com...
> You may need to add a listener to the .selectedIndex so Flash can know
> when a change has occurred, and when it becomes positive by an entry or
> being prompted to hit Enter, it is activated.
>
> K.
 >> Stay informed about: DataGrid - selecting, highlighting, navigating to a row 
Back to top
Login to vote
Display posts from previous:   
   Graphic Forums (Home) -> General Discussions All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]