Here is a new component that I wanted to share. It extends the mx:DataGrid and its goal is to keep a column "fixed" in the DataGrid. This, whatever the dataProvider is or changes and even when columns are dragged or new ones are added. This is maybe specific to my own need but you never know
This is quite strange that this function is tagged as private in the DataGrid code. Then, it doesn’t appear in the documentation although this is really useful.
dataGrid.mx_internal::shiftColumns(oldindex, newindex, event); |
This will move the column at the oldindex to the newindex. And you can also use an event.
Of course, to use the mx_internal namespace, you need to add the following code:
import mx.core.mx_internal; use namespace mx_internal; |
So ok… 3 lines of code.