Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Barbara Peisch
  Where is Barbara Peisch?
 Oceanside
 California - United States
 Barbara Peisch
 To: Datvt Dat
  Where is Datvt Dat?
 Ho Chi Minh
 Vietnam
 Datvt Dat
 Tags
Subject: RE: Change caption property in Grid
Thread ID: 78807 Message ID: 78811 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Grids
Date: Sunday, October 09, 2005 5:09:14 AM         
   


> I have Grid with few column in ThisForm1.Scx
>
> I do:
> USE ThisForm1.Scx
> BROW
> Then I modify Memo field with Caption properties of Column
> Ex Caption = "AAAA"
> Then Modify FORM ThisForm.Scx
> Result is Caption property of one column is AAAA
>
> But I have program
> SET TALK OFF
> SET SAFETY OFF
> USE ThisForm1.Scx
> GO TO..
> M.Properties = [Caption = "BBB"]
> GATHER MEMVAR MEMO
> Then Modify FORM ThisForm.Scx
> Result is Caption property of one column is "Header1"
>
> Retest
> USE ThisForm1.Scx
> BROW
> I see Caption = "BBB" in Properties Memo
>
> Why I modi form Herder of column is "Header1"?


FWIW, when I try this, it works fine, but...

I'm not sure why you're taking this approach at all when at runtime you can just say Thisform.grid.columnx.header1.caption = "AAAA". I can see a couple of things here that could be the source of your problem. First, which record are you on when you open the SCX? How do you know it's the correct record for the header of the column you want? Second, you're wiping out anything else that's in the Properties field, like the name, which is kind of important. If you really need to take this approach, you should be parsing the properties field for the caption entry, and just change that one line, or add it if it's not there.

-BP
www.peisch.com

ENTIRE THREAD

Change caption property in Grid Posted by Datvt Dat @ 10/8/2005 10:47:41 PM
RE: Change caption property in Grid Posted by Barbara Peisch @ 10/9/2005 5:09:14 AM
RE: Change caption property in Grid Posted by Datvt Dat @ 10/10/2005 9:59:41 AM
RE: Change caption property in Grid Posted by Barbara Peisch @ 10/10/2005 9:00:05 PM