change it to if(data) albumName.text = data[column.dataField];
Thank You, Stephen C -All of my email addresses go to the same place -Save Paper, think before you print -PGP Public Key<https://docs.google.com/file/d/0B0JeFeQj5XjkZC0talFuRExyc0E/edit?usp=sharing> On Thu, Sep 5, 2013 at 7:46 AM, <[email protected]> wrote: > The itemRenderer looks like this: > > <?xml version="1.0" encoding="utf-8"?> > <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:s="library:// > ns.adobe.com/flex/spark" > xmlns:mx="library:// > ns.adobe.com/flex/mx" clipAndEnableScrolling="true"> > > <fx:Script> > <![CDATA[ > override public function > prepare(hasBeenRecycled:Boolean):void { > albumName.text = data[column.dataField] > } > ]]> > </fx:Script> > > <s:VGroup height="100" paddingTop="10"> > <s:Label id="albumName" > width="100%" > text="{data.Album}"/> > </s:VGroup> > > </s:GridItemRenderer> > > -----Ursprüngliche Nachricht----- > Von: Stephen C [mailto:[email protected]] > Gesendet: Donnerstag, 5. September 2013 13:38 > An: [email protected] > Betreff: Re: DataGrid with itemRenderer Drag and Drop error > > in your itemRenderer are you doing if(data){} etc... There any many reasons > for null data being in a cell. > > Thank You, > Stephen C > -All of my email addresses go to the same place > -Save Paper, think before you print > -PGP Public Key< > https://docs.google.com/file/d/0B0JeFeQj5XjkZC0talFuRExyc0E/edit?usp=sharing > > > > > On Thu, Sep 5, 2013 at 7:28 AM, mspecht <[email protected]> > wrote: > > > Hi, > > > > I tried to use the drag and drop functionality of the DataGrid. One > column > > contains a special itemrenderer. As soon as I try to drag one item I get > a > > null pointer exception for the coulmn in the itemRenderer. > > > > A simple example is attached. > > > > I didn't find a related bug in JIRA. May I open a ticket? > > > > FlexDataGrid.fxp > > < > > > http://apache-flex-users.2333346.n4.nabble.com/file/n2574/FlexDataGrid.fxp > > > > > > > > > > > -- > > View this message in context: > > > http://apache-flex-users.2333346.n4.nabble.com/DataGrid-with-itemRenderer-Drag-and-Drop-error-tp2574.html > > Sent from the Apache Flex Users mailing list archive at Nabble.com. > > >
