I was looking at the help and dataProvider.addItem() method
dispatches a modelchanged event (so you dont have to).....therefore
remove
mx.core.Application.application.dgcolore.dataProvider.dispatchEvent
({type:"modelChanged"});.
First, of all it should have worked (try out a simple example)
Second, you have the following line in your code -
vocolore.addItem(vo);
Array class doesnt have a addItem method
finally try a forced redraw of the datagrid (not ideal)
eg. datagrid.redraw()
--- In [email protected], "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> sorry but don't work only if i click into row of dataGrid display
the
> user change ?
> Devis
> bhaq1972 ha scritto:
>
> >try firing a modelChanged event after your addItem eg
> >mx.core.Application.application.dgcolore.dataProvider.addItem
> >(vocolore);
>
>mx.core.Application.application.dgcolore.dataProvider.dispatchEvent
> >({type:"modelChanged"});
> >
> >
> >--- In [email protected], "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> >wrote:
> >
> >
> >>Thank's work fine,
> >>but now my dataGrid not refresh the data into dataGrid
> >>
> >>
> >in "realTime" ,
> >
> >
> >>only if i click with mouse into a row dataGrid the data are
> >>
> >>
> >refresh!
> >
> >
> >>Bye
> >>Devis
> >>
> >>bhaq1972 ha scritto:
> >>
> >>
> >>
> >>>try
> >>>mx.core.Application.application.dgcolore.dataProvider.addItem
> >>>(vocolore);
> >>>
> >>>
> >>>
> >>>--- In [email protected], "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>
> >>>wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Hi,
> >>>>i have an dataGrid with an dataProvider of array of CColoriVO.
> >>>>
> >>>>
> >>>>
> >>>>from here work:
> >>>
> >>>
> >>>><mx:DataGrid dataProvider="{vocolore}" width="100%"
> >>>>
> >>>>
> >id="dgcolore"
> >
> >
> >>>>cellPress="key=dg.selectedIndex">
> >>>>vocolore it's "loaded" in this way
> >>>>
> >>>>public var vocolore:Array;
> >>>>function getColor_result(event)
> >>>>{
> >>>> mx.core.Application.application.vocolore=event.result;
> >>>>}
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>from here don't work
> >>>
> >>>
> >>>>and in my function
> >>>>
> >>>> function Nuovo()
> >>>> {
> >>>> var vo:CColoriVO;
> >>>> var pk:CColoriPK;
> >>>>
> >>>> vo=new CColoriVO();
> >>>> pk=new CColoriPK()
> >>>> vo.ccoloripk=pk;
> >>>> vo.ccoloripk.stagpd=PfVO(vopf[0]).pfvopk.stagpf;
> >>>> vo.ccoloripk.modepd=PfVO(vopf[0]).pfvopk.modepf;
> >>>> vo.ccoloripk.matepd=PfVO(vopf[0]).pfvopk.matepf;
> >>>> vo.ccoloripk.colopd="Y";
> >>>> vo.decopd="Z";
> >>>> vocolore.push(vo);
> >>>> vocolore.addItem(vo);
> >>>> mx.core.Application.application.dgcolore.addItem(vocolore);
> >>>> }
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>But the dataGrid change but the row it's always blank??????
> >>>>
> >>>>Devis
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >
> >
> >
> >
> >
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
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/