You can do this, but you will either need to extend datagrid or do a bunch of 
stuff external 
to the class.

My approach would be an extension.

I would override the column setter and after doing all the basics, I would also 
create an 
arrayCollection in the setter using the column data as the source. Then listen 
to the 
collection update events on this collection. In your handler for those events, 
you could 
switch on the event type and broadcast things like a columnAdd or columnRemove 
event

You can also override the setter and/or collection change handler for the 
daaProvider to 
fire a custom events on the specific condition you need. While it is a bit 
ugly, your 
renderers or other custom controls could subscribe to this event on the 
datagrid when 
they are created (make sure you use weak event listeners for this before you 
create a 
potential world of trouble when adding new columns) Then you can respond as 
needed on 
the change.

There may be a better way, but not knowing exactly what you need to do, this is 
some 
general advice.

This is, of course, untested and might require some variation from above as 
this is off the 
top of my head.

Labriola

--- In [email protected], "reflexactions" <[EMAIL PROTECTED]> 
wrote:
>
> Grid Columns dont have a creationComplete event unfortunately..
> 
> and I think dataChange doesnt fire when the grids dataProvider is set.
> 
> I think its not possible to do what I want and I need to think of a 
> different approach.
> 
> but tks anyway..
> 
> --- In [email protected], "ben.clinkinbeard" 
> <ben.clinkinbeard@> wrote:
> >
> > > when the parent grids dataProvider is set or changed
> > 
> > DataGrid's dataChange event I believe
> > 
> > 
> > > when the column is added to a grid?
> > 
> > column's creationComplete event
> > 
> > 
> > HTH,
> > Ben
> > 
> > 
> > --- In [email protected], "reflexactions"
> > <reflexactions@> wrote:
> > >
> > > Is there a way in a custom column component to detect when the 
> parent 
> > > grids dataProvider is set or changed, and also detect when the 
> column 
> > > is added to a grid?
> > > 
> > > tks
> > >
> >
>



Reply via email to