Joao,
We faced a similar challenge (we have a report that the user can
customize and persist which columns to display) and instead of actually
removing the columns, we found it much simpler to manage the visibility
instead...affecting the column.visible property. So when their report is
loaded, we read their report/column setting from the db, then build the
report and cycle thru the columns, determining which ones are visible
and "turn off" the ones that aren't.
Adrian
Joao Coelho wrote:
Anyone knows if it is possible to add and remove columns to an
AdvancedDataGridColumnGroup at runtime?
So far I had no luck doing so.
What I have tried:
- pushing new columns into the children property;
- setting children property to a newly created and populated array;
- getting the children property into a new array, altering the array
and setting de children property to this array.
None of this worked.
I'm avoiding creating the AdvancedDataGridColumnGroup dynamically also
due to the columns having to be created based on a result from a
service call and the grid having other columns before and after this
group.
Thanks,
Joao