With This.Columns(This.ColumnCount) && Or just THIS.Column1 .ControlSource = arItems[1] *** .Value = arItems[1] && Commented out .FontName = "Tahoma" .FontBold = .f. .FontSize = 8 .Width = 50 EndWithHTH
>Use "tablesamp" in 0 shared >With ThisForm.GridGeneral1 > .RecordSource = "tablesamp" > .LayoutRefresh("cProj,The Project") > .Refresh() >EndWith >>Here is the LayoutRefresh code in the GridGeneral class. The header shows fine, but not the textbox stuff.
> Parameters cCol1 , cCol2 , cCol3 , cCol4 , cCol5 > This.ColumnCount = 0 > If VarType(cCol1) ="C" > oColItems = StrTran( cCol1 , "," , Chr(13) ) > nItemCount = ALines(arItems, oColItems, .t.) > EndIf > This.ColumnCount = This.ColumnCount + 1 > With This.Columns(This.ColumnCount) > .Width = 50 > .Header1.Caption = arItems[2] > .Header1.FontName = "Tahoma" > .Header1.FontBold = .t. > .Header1.FontSize = 8 > EndWith > With This.Columns(This.ColumnCount).Text1 > .ControlSource = arItems[1] > .Value = arItems[1] > .FontName = "Tahoma" > .FontBold = .f. > .FontSize = 8 > .Width = 50 > EndWith >>