Hi Thomas!
ths is a quick solution:
at design time open your form.grid
right click on grid and use the assistant builder
The tab "style" in the Grid builder specifies a style for the grid display.
Specifies the Professional, Standard, Embossed, or Ledger style for the grid display.
choose your table and in the style TAB you can choose:
-professional
-or ledger
in these styles the grid columns headers are not separated by separators.
....and run the form
note that
thisform.grid1.gridlinesColor=rgb(255,255,255)
or
thisform.grid1.gridlines=0
solve the problem for rows but not for header separators
how this can be achieved programmatly. ?
USE "c:\program files\microsoft visual foxpro 9\wizards\gridstyl.dbf" SHARED
brow
<pre>
you can see the properties (memo) you must set to solve the problem.for ex choosing the professional style can be done with this code:
<pre>
Close Data All
Publi yform
yform=Newobject("ygrid_professional")
yform.Show
Read Events
Retu
Define Class ygrid_professional As Form
Height = 363
Width = 737
ShowWindow = 2
AutoCenter = .T.
Caption = "professional grid"
Name = "Form1"
Add Object grid1 As Grid With ;
ColumnCount = 15, ;
Anchor = 15, ;
DeleteMark = .F., ;
GridLines = 1, ;
GridLineWidth = 1, ;
HeaderHeight = 20, ;
Height = 360, ;
Left = 9, ;
RecordMark = .F., ;
RecordSource = "ycurs", ;
ScrollBars = 3, ;
Top = 3, ;
Width = 721, ;
ForeColor = Rgb(0,0,0), ;
BackColor = Rgb(192,192,192), ;
GridLineColor = Rgb(255,255,255), ;
Name = "Grid1"
Procedure grid1.Init
Sele * From Home(1)+"samples\data\customer" Into Cursor ycurs
With This
.Themes=.T.
.RecordSource="ycurs"
.BackColor = Rgb(192,192,192)
.ForeColor = Rgb(0,0,0)
.GridLineColor = Rgb(255,255,255)
.GridLineWidth = 1
.GridLines = 1
.HeaderHeight = 20
.DeleteMark = .F.
.RecordMark = .F.
.ScrollBars = 3
For i=1 To .ColumnCount
.Columns(i).Alignment = 0
.Columns(i).DynamicBackColor = ""
.Columns(i).FontBold = .F.
.Columns(i).FontName = "Arial"
.Columns(i).FontSize = 8
.Columns(i).header1.BackColor = Rgb(0,0,0)
.Columns(i).header1.ForeColor = Rgb(255,255,255)
.Columns(i).header1.FontBold = .T.
.Columns(i).header1.FontName = "Arial"
.Columns(i).header1.FontSize = 10
.Columns(i).header1.Alignment = 0
.Columns(i).header1.Caption = Proper(Field(i))
Locate
.Refresh
Endfor
Endwith
Endproc
Procedure Destroy
Clea Events
Endproc
Enddefine
you can achieve the other styles with the table wizard cited above....