Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid control
Message
From
06/11/1998 07:42:20
Rex Mahel
Realm Software, Llc
Ohio, United States
 
 
To
06/11/1998 07:35:02
Charlie Davies
McIntire School of Commerce
Virginia, United States
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00155147
Message ID:
00155151
Views:
25
Charlie,

I believe this property is set on the Column and is copied (seemingly read only) to the ActiveControl. I think this is so the Column and ActiveControl controlsources will always be in sync.

HTH

Rex


>I've been working on a form that will allow users add/edit their setup tables. To do this, I've been working with the grid control.
> When this form gets invoked, all the properties of the grid control need to be set within the Init method. There seems to be no problem setting any properties for the grid itself, the columns, or the headers, but when I try to set the property for text control within the column, I get the following error message:
>
> "Parent object will not allow this property setting for
> form1.grid1.column1.text1.ControlSource"
>
> And this is the code that I have placed in the Init() to set
>properties of the form and the grid control:
>
>
>INIT METHOD
>slcTable = ALLTRIM(tmpLookup.Name)
>
>IF !USED(slcTable)
> USE slcTable IN 0 EXCLUSIVE
>ENDIF
>
>ThisForm.Height = VAL(tmpLookup.Form_hght)
>ThisForm.Width = VAL(tmpLookup.Form_wdth)
>ThisForm.Top = VAL(tmpLookup.Form_top)
>ThisForm.Left = VAL(tmpLookup.Form_left)
>
>ThisForm.Grid1.Height = VAL(tmpLookup.Grid_hght)
>ThisForm.Grid1.Width = VAL(tmpLookup.Grid_wdth)
>ThisForm.Grid1.Top = VAL(tmpLookup.Grid_top)
>ThisForm.Grid1.Left = VAL(tmpLookup.Grid_left)
>ThisForm.Grid1.ColumnCount = VAL(tmpLookup.Grid_clcnt)
>ThisForm.Grid1.RecordSource = ALLTRIM(tmpLookup.Grid_recs)
>ThisForm.Grid1.RecordSourceType = VAL(tmpLookup.Grid_recst)
>
>ThisForm.Grid1.Column1.ControlSource = ALLTRIM(tmpLookup.Col1_cnts)
>ThisForm.Grid1.Column1.Width = VAL(tmpLookup.Col1_width)
>ThisForm.Grid1.Column1.Header1.Caption = ALLTRIM(tmpLookup.Head1_cap)
>ThisForm.Grid1.Column1.Text1.ControlSource = ALLTRIM(tmpLookup.Text1_cnts)
>
>ThisForm.Grid1.Column2.ControlSource = ALLTRIM(tmpLookup.Col2_cnts)
>ThisForm.Grid1.Column2.Width = VAL(tmpLookup.Col2_width)
>ThisForm.Grid1.Column2.Header1.Caption = ALLTRIM(tmpLookup.Head2_cap)
>*!* ThisForm.Grid1.Column2.Text1.ControlSource = ALLTRIM(tmpLookup.Text2_cnts)
>
>ThisForm.Grid1.Column3.ControlSource = ALLTRIM(tmpLookup.Col3_cnts)
>ThisForm.Grid1.Column3.Width = VAL(tmpLookup.Col3_width)
>ThisForm.Grid1.Column3.Header1.Caption = ALLTRIM(tmpLookup.Head3_cap)
>*!* ThisForm.Grid1.Column3.Text1.ControlSource = ALLTRIM(tmpLookup.Text3_cnts)
>
> I don't know if this is a limitation of FoxPro, or something that I am missing along the way.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform