views:

82

answers:

1

I need to use a global flag. This flag will be set whenever I change my datagrid i.e. add/ update rows, change checkboxes, radiobuttons, etc. in my screen. Also, on what event can this global variable be set. Will "change()" or "click()" work. Need some idea in this context.

A: 

From the sounds of it you don't want to add any events to your datagrid.

You actually want to listen on it's dataProvider.

I'll assume you are using an ArrayCollection, as the dataProvider. You'll want to add an eventListener to the arrayCollection on COLLECTION_CHANGE (see here for details).

Then you can update your global flag every time that event is dispatched.

Paul