I finally managed to track down the code I needed, it's in the commitProperties method of Grid.as (line 3555). That's the good news. The bad news is I still seem to be missing something. My understanding was, if the datagrid autogenerated the columns, those columns would be replaced if another collection of columns are defined for the datagrid at some later point. For some reason that doesn't seem to be happening for me.
The datagrid I'm working with is part of a larger component with a skin. The list of columns for the datagrid is bound to an ArrayList defined in the hostComponent of the skin. I can understand why the creation of the columns could happen before the binding from the host triggers, what I don't get is why they aren't overridden later. Any suggestions?
So, as you've discovered, the private Grid/generateColumns() method is called if the columns list is still null at commitPropertes() time. Subsequent changes to the columns property, even as a consequence of binding, should update the colums list as expected.
Could you create an example that demonstrates the problem you've run into? I'd be happy to look at it.
Turns out the source of the problem was between my ears I forgot to add the binding of the columns collection from the host component in the skin class. Once I added that, the default columns were overridden and everything worked great.