You can further simplify your code by using the Grid.SetAll() method to set a column or header particular property for all columns or headers in the grid without looping through each column. The VFP Help on SetAll Method has good examples for grids. Since you are displaying all fields in the order they appear in the cursor, view or table, you can just set the ColumnCount to -1 and not even set any grid column properties.
Mark McCasland
Midlothian, TX USA