
Agregar un Grid desde código
Publicado por Juan (71 intervenciones) el 11/03/2015 17:24:54
Cómo se puede hacer para crear una clase desde código con un grid, me da error al crear los header. Alguien me puede ayudar con un pequeño ejemplo?
Lo quiero hacer de la siguiente manera:
Al añadir el HEADER1 me da un error de systaxis
Lo quiero hacer de la siguiente manera:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
DEFINE CLASS Form1 AS Grid
Caption="Prueba"
Height=600
Width=800
ADD OBJECT grid1 AS grid WITH ;
ColumnCount = 3, ;
AllowAddNew = .T., ;
AllowHeaderSizing = .F., ;
AllowRowSizing = .F., ;
DeleteMark = .F., ;
Height = 324, ;
Left = 12, ;
Panel = 1, ;
RecordSource = "contrqst", ;
RecordSourceType = 1, ;
ScrollBars = 2, ;
TabIndex = 2, ;
Top = 12, ;
Width = 540, ;
BackColor = RGB(255,255,255), ;
Name = "Grid1", ;
Column1.ColumnOrder = 2, ;
Column1.Width = 85, ;
Column1.BackColor = RGB(255,255,255), ;
Column1.Name = "Column1", ;
Column2.ColumnOrder = 3, ;
Column2.Width = 408, ;
Column2.BackColor = RGB(255,255,255), ;
Column2.Name = "Column2", ;
Column3.ColumnOrder = 1, ;
Column3.Width = 16, ;
Column3.Sparse = .F., ;
Column3.BackColor = RGB(255,255,255), ;
Column3.Name = "Column3"
ADD OBJECT form1.Grid1.Column1.header1 AS header WITH ;
Alignment = 2, ;
Caption = "Importe", ;
Name = "Header1"
ENDDEFINE
Al añadir el HEADER1 me da un error de systaxis
Valora esta pregunta


0