&& grid base class init() =this.ProcessColumns() && amongst other things && ProcessColumns() local i for i = this.ColumnCount to 1 step -1 && decreasing: in clase you delete a column further down =this.ProcessColumn(this.Columns(m.i)) endfor && ProcessColumn lparameters obj local i, s, cs, t, cs_table, cs_Field do case case this.NoInit && to set if the grid is done with the designer and you do not want to have it touched case type('m.obj.PostProcessed') == T_LOGICAL otherwise =m.obj.AddProperty('PostProcessed') cs = lower(m.obj.ControlSource) t = type(m.cs) t = iif(inlist(m.t, T_UNDEFINED), vartype(eval(m.cs)), m.t) cs_Field = substr(m.cs, at('.', m.cs)+1) cs_table = left(m.cs, at('.', m.cs)-1) do case case inlist(m.t, T_CURRENCY) obj.Text1.Visible = FALSE =obj.RemoveObject('Text1') =obj.AddObject('_Currency', '_currency') obj._Currency.Visible = TRUE m.obj.Sparse = FALSE s = 'iif(' + obj.ControlSource + '<$0, rgb(255,0,0), rgb(0,0,0))' obj.DynamicForeColor = m.s case inlist(t, T_LOGICAL ) obj.Text1.Visible = FALSE =obj.RemoveObject('Text1') =obj.AddObject('_Checkbox', '_Checkbox') obj._Checkbox.Visible = TRUE m.obj.Sparse = FALSE case inlist(m.t, T_DATE, T_DATETIME ) obj.Format = 'D' && 2 or 4 chars obj.Text1.Visible = FALSE =obj.RemoveObject('Text1') =obj.AddObject('text1', '_TextBox) obj._Checkbox.Visible = TRUE case ( m.t == T_MEMO ) obj.Text1.Visible = FALSE obj.RemoveObject('Text1') obj.AddObject('Text1', '_editbox') obj.Text1.Scrollbars = 0 obj.Sparse = FALSE obj.Text1.Visible = TRUE case && and so on endcase if( !inlist(m.t, T_MEMO, T_LOGICAL ) ) obj.Alignment = 3 endif =m.obj.Setall('FontSize', 8) =m.obj.Setall('BorderStyle', 0 ) =m.obj.Setall('Margin', 0) endcaseProcessColumns or ProcessColumn(obj) can be called when you need it from other methods, eg recordSource_assign
&& add/remove columns =DoDefault() && postprocess, eg add another control, change Dynmamic...Success, and Merry Christmas too