views:

95

answers:

1

Hi, I better explan what i mean:

I have a Data Grid with automacticly genorated columns, i now need to add data items into a spesific row / column of this grid e.g. col 2 row 3. It dosnt have a data provider at the moment as i wish to be very selective about which data goes where.

Which is the best way to do this?

Thanks Jon

A: 

I don't think it's possible to use a Datagrid without any dataProvider.

If you wan't to now where your data goes you could use an ArrayCollection with objects. These objects can have multiple attributes like "column1", "column2" and so on.

So you can do something like this:

var obj:MyObject = new MyObject();
obj.column2 = "foo";
myDataGrid.dataProvider.addItemAt(obj,3);

Now you have placed "foo" in column2 of row 3.

But this isn't really beautiful, maybe you can achieve what you want without abusing the DataGrid.

hering