I’m not sure of the right way to do this for now but it’d be worth filing as an enhancement request to make this easy for the next version of Flex.  http://www.macromedia.com/go/wish.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of thisdudenamedjon
Sent: Friday, October 07, 2005 2:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Focusing cell on datagrid

 

I'm sorry. Let me rephrase my question and make this a little
simpler. I have an editable datagrid. Whenever the change event is
called, I send the dataProvider to a remoteObject for validation.

What I would like to do is to prevent the user from editing any other
cell if the validation finds errors in the recently edited cell. I
would like to force the focus to be on invalid cell until the error
is corrected.

I'm open to any suggestions on the best way to do this. Thank you.

Jon

--- In flexcoders@yahoogroups.com, "bhaq1972" <[EMAIL PROTECTED]> wrote:
>
> I'm not sure if this is what your asking so i might be wrong
>
> after you've done your async remote object call and your focused on
> a combobox cellrenderer use this code (untested)
> //maybe in cellFocusIn?
> if(dg.cellEditor.className =="ComboBox")
> {
>   dg.cellEditor.addEventListener("open", mx.utils.Delegate.create
> (this, doOpen));
> }
>
> create a function in your page called do Open
> function doOpen(event)
> {
>   event.target.close();
> }
>
> so everytime someone opens the combobox cell renderer, it closes.
>
>
>
>
>
>
> --- In flexcoders@yahoogroups.com, "thisdudenamedjon"
> <[EMAIL PROTECTED]> wrote:
> >
> > I have a datagrid with several columns of cells that are editable
> and a
> > custom combobox cell renderer. When a user edits a cell and
> leaves, I
> > pass that entire row to a RemoteObject to do some validation. If
> there
> > are errors, I want to keep that cell focused until the errors are
> > corrected.
> >
> > Right now, I have implemented this using my datagrid's change and
> > cellEdit listeners to simply dispose the celleditor and set
> focused
> > cell to the errored cell. However, with my combobox, Mm invalid
> cell
> > simply loses focus and I am able to access and change it. I do
not
> want
> > to allow access to this combobox while I still have an error.
> >
> > Can someone point me towards a more elegant solution or something
> to
> > force the focus back onto the invalid cell when I access the
> combobox.
> >
> > Thanks.
> >
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to