This content has been marked as final. Show 4 replies
To prohibit the datagrid column to be not displayed make the column-width=0.
Then whenever you want to dislplay just adjust the width=100% at runtime[ in script.]
Thanks for your answer but it does not fit my problem. I don't speak about displaying columns, I only talk about the definition of columns.
I noticed that in the source code of the DataGrid class that there is a boolean value named "generatedColumns" which tells the DataGrid whether a developer specifically declared his columns within the <mx:columns> tag. This value is modified within the collectionChangeHandler method which is called when the coresponding dataProvider is defined.
The thing is, there is no easy way to override this callback than rewriting the code in an herited class where this method has to be redefined.
Maybe another possibility to do so ?
What are you trying to accomplish?
Just trying to know if there is a way to know if columns were predefined by a developer before the corresponding bound dataProvider has been set.