views:

397

answers:

3

Hi everybody,

I've a custom itemRenderer for my datagrid. To set the actual data I use the following method:

override public function set data(side:Object):void{
   ...
}

As soon as I use this function the cell doesn't show up any item Editor anymore. Why is that? When I remove this function the itemEditor is working but with the wrong initialization data...

What's the proper way to handle this?

Thanks, Markus

+1  A: 

Have u called 'Super' on that method ?

Immanuel
Is that right: super.data = XMLElement.toString();?
Markus
Actually my problem is that the function set data gets called with the data of the whole row and afterwards with the data of just the the cell item. So I check now what gets handed over to my side variable and am assigning the values appropriately.
Markus
A: 

Thanks Immanuel,

This solved it partially, but I got a new problem...

The following error shows up after I leave the element...

ReferenceError: Error #1069: Property Column1 not found on String and there is no default value

The debugger stops at DataGrid.as:

if (property != null && data[property] !== newData){
   bChanged = true;
   data[property] = newData;
}

Why that?

Thanks Markus

Markus
A: 

Make sure that you also have an itemEditor that is correctly working or that you set the rendererIsEditor property to true and use the renderer as the editor.

James Ward
Thanks for your answer. I found the problem I had! I wrote it in the comment of Immanuels post! Thanks!
Markus