Search in the docs for itemRenderers; you should find plenty of 
literature and examples.

Another approach would be to use the change event, since this fires 
not only when an item is selected but also when items are unselected 
such as when ctrl-clicking a selected item.  Since your dg allows 
multiple selections, you could save the previous value of the 
selectedItems array for comparing to the new selected items the next 
time they change.  It would require a bit of code to determine which 
items were unselected by searching through the selectedItems array 
with values from the previously saved items and keeping track of the 
differences.


--- In [email protected], "jldteixeira" <[EMAIL PROTECTED]> 
wrote:
>
> --- In [email protected], "Doug Lowder" <douglowder@> 
wrote:
> >
> > The information you need should be right there in the 
itemFocusOut 
> > event object.  I suspect the function should look something like 
> > 
> > removeInfoBox(event.currentTarget.dataProvider[event.rowIndex])
> > 
> > 
> > --- In [email protected], "jldteixeira" <jldteixeira@> 
> > wrote:
> > >
> > > Hi, I want to call a function when i deselect an item from 
datagrid
> > > and i want to parse the unselected item to the function like:
> > > 
> > > <mx:DataGrid  id="showsList" dataProvider="{showsData}" 
> > >   width="600" height="100%" draggableColumns="false"
> > >   resizableColumns="false" sortableColumns="false" 
> > >   itemClick="showShowInfo(this.SelectedItem)"
> > >   allowMultipleSelection="true"
> > >   itemFocusOut="removeInfoBox(**??unselectedItem??**)" />
> > > 
> > > Thanks in advance
> > >
> >
> 
> That is correct mate, thank you, but now i'm having another 
problem,
> the itemFocusOut is not working has i predicted, (i also tryed
> itemFocusIn="Alert.show('hello')" and nothing happened) any tips?
> the itemClick works around the itemFocusIn for me so no problem 
there
> but don't know whats happening for this not to be working.
> 
> From the help file 
> 
> "itemFocusOut: Dispatched when an item renderer loses focus, which 
can
> occur if the user clicks another item in the DataGrid control or
> clicks outside the control, or uses the keyboard to navigate to
> another item in the DataGrid control or outside the control."
> 
> seems like i have to use item renderer? what is this?
> 
> once again, thanks in advance, any tips are welcome.
>







--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to