views:

29

answers:

2

Hi gang,

Yet another woe with the AdvancedDataGrid - this time, with the AdvancedDataGridEvent.

It seems that when listening to the ITEM_EDIT_END event, several of the event properties are returned null. I've been getting null for event.column, event.item, etc.

Has anyone experienced this before? If so, did you find a way to resolve the issue?

Thanks!

A: 

After inspecting AdvancedDataGrid and AdvancedDataGridBaseEx, it appears that the events being dispatched are simply not being provided with the column or item (and several other) properties. I'm not sure if this is an oversight of adobe's, the infamous "not flex dev" team who built the AdvancedDataGrid classes, or if the version of the SDK I have is incomplete for some reason, but it sure is annoying.

If anyone has rewritten this set of classes in a clean and/or functional way and cares to share, please do. Unfortunately there's no time for me to start that spaghetti-fest during this build.

Any info/links would be greatly appreciated.

Cheers

SpaceCase
A: 

Have you tried drilling into event.target? For example, in the AdvancedDataGridEvent handler you could go event.target.columns[event.columnIndex] to get a hold of the column responsible for the event.

Jeremy Mitchell
Thanks for the answer Jeremy!I've tried a similar approach, and for non-tree data it seems to work well.Where I ran into trouble was getting the data object associated with a nested item; event.rowIndex only gives you a flat index of the visible rows (so a nested item at the second child index of the first node in the tree would still give you event.rowIndex = 3).That said, I had previously been trying to access the cell's data directly through the dataProvider of the grid. Going through the column directly might work; I'll give this a try soon and post results.
SpaceCase