Friday, December 14, 2007

Grid's Main Record

I dicovered an interesting thing about grids in 8.49. It might also apply to prior releases.

The Main record that is set on the General Tab of the Grid's property need not necesarily be the used in the grid. meaning the columns in the grid may be based on fields from another record which is the "true main record ".

What, then, is the use of the main record ? The only logical explanation seems to be that it helps in adding columns to the grid. When a new column is added,the record attribute for the column defaults to this record. One only needs to select the relevant field from this record.

Once you have add all your columns, you can potentially change the main record on General tabs later on grid without impacting the functionality of the grid. Peoplecode could get the grid object by referencing the page field name on the same Genral Tab. This will point to the grid object that you are interested especially if there are multiple scross. You could also reference the grid by passing the real main record.