Thanks for reply.
this how I wrote dispatchEvent call in renderer.
(this.owner as DataGrid).dispatchEvent(customEvent);

how can I get object of render to call its dispatchEvent from outside into
renderer ?

On Tue, Apr 19, 2011 at 3:53 PM, Kronos <[email protected]> wrote:

> Hi Akshay,
>
>     I have a suggestion but I dont think u will like it. It works on
> your own logic that u have stated.
>
> What u were doing is that after every tab event from Textfield3 you
> were dispatching an event.
> Now in the event listener function, u are able to get the next
> rowIndex & columnIndex. So based on the appropriate values dispatch
> another event which will correspond to that column & row's Textfield1.
> Since the event will be unique only one textfield will respond to that
> event & u can assign focus on the textfield that responded to the
> event.
>
> Its not the best way but I think it should work.
> Note: It also hardcodes the event with the row & column combination.
>
> On Apr 19, 12:43 pm, Akshay Ransing <[email protected]> wrote:
> > thanks for reply but I guess You dont understand problem completely.
> >
> > 1 > I have renderer with 3 textfields init, first I need to travel it
> like
> > text1 to test2 thne text2 to text3.
> > I can do it its really simple problem starts from here.
> > 2 > when I have focus on text3 of my renderer and i press tab i need to
> move
> > my focus to next column's cell on same row.
> > also my next column have same renderer and these columns are dynamically
> > added to my grid as per database relation.
> >
> > my logic was to dispatch a event from renderer when i click tab from
> text3
> > of renderer to grid level mxml.
> > and i this function I can know which rowIndex and columnIndex I got call.
> > but I dont find way to assign focus to next cell by giving
> > rowIndex,columnIndex for it.
> >
> >
> >
> > On Tue, Apr 19, 2011 at 12:13 PM, xelf <[email protected]> wrote:
> > > Hi Akshay,
> >
> > > Option 1:
> > > Try to give tab index for each component which am not sure, just
> > > giving a thought.
> >
> > > Option 2:
> > > There is a workaround for solving this issue, but this inlvolves lot
> > > of coding.
> >
> > > 1. In your data provider add a field to monitor and assign the current
> > > focus.
> > > 2. Whenever there is a change uin focus, inside your item renderer you
> > > have to assign the current focus appropriately in the field, this will
> > > help you identify the exact focus inside datagrid.
> > > 3. Inside itemrenderer, you have to explicitly assign the focus for
> > > Textinputs. (Ex: if focus is in TextInput1, 'onFocusOut' of
> > > TextInput1, you have to assign the field values.
> > > 4. Once there is any change dataChangeEvent will be dispatched or else
> > > yiou can dispatch any custom event.
> > > 5. In each component there should be a listerner to set focus.
> > > 6. In this case, OnFocusOut of TextInput1, event have to be dispatched
> > > and currentFocus field should refer TextInput2, then focus will be
> > > assigned to TextInput2, in event listerteners.
> >
> > > This procedure have to be taken care for all components used inside DG
> > > to get the expected flow.
> >
> > > Thanks,
> > > Sam
> >
> > > On Apr 18, 11:33 am, Akshay Ransing <[email protected]> wrote:
> > > > Hi,
> >
> > > > I have a data grid with dynamic columns and dynamic rows.
> > > > Each columns have same item renderer which is custom made with 3 text
> > > > inputs.
> >
> > > > My problem is I want to travel between cells but my tab should work
> > > > like for each cell it should travel from 1st to 3rd text input from
> > > > rendere and from 3rd text input to next cell.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Flex India Community" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected].
> > > For more options, visit this group at
> > >http://groups.google.com/group/flex_india?hl=en.
> >
> > --
> > Thanks & regards
> > Akshay Ransingwww.enovate-it.com
> > we care. we help you all to win.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>


-- 
Thanks & regards
Akshay Ransing
www.enovate-it.com
we care. we help you all to win.

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to