cdugga
cdugga

Reputation: 3859

Flex datagrid - determining when grid has completed renderering?

I have a datagrid which contains a number of itemrenderers, it is populated each time a user does a search. Is there an event which can tell me when the datagrid has completed rendering all new rows and item renderers?

I need to trigger an event once everything has been created so that I can resize then container which holds the grid.

Currently I'm using DataGridEvent.HEADER_RELEASE and CollectionEvent.COLLECTION_CHANGE events to manage this however the problem with these events is that they get called as each new row is being added to the datagrid. therefore the whole process is becoming sluggish.

Does anyone have any suggestions?

Upvotes: 0

Views: 1392

Answers (2)

user240870
user240870

Reputation:

And also make sure that you are verifying the correct update complete output. because update complete will be called whenever there is change in the rendering of the grid. it is fired once when grid is created and Grid borders are formed. and once after data is populated(the one u askd for) and again whenever u adjust the header or data is updated it is fired.

Upvotes: 1

sharvey
sharvey

Reputation: 8185

Try listening for FlexEvent.UPDATE_COMPLETE.

Upvotes: 3

Related Questions