Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where did Grid.Column0 come from?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00569629
Message ID:
00569662
Views:
39
>Hi!
>
>What is the grid's record source type? Do you use custom class for grid? Did you tired to use grid's RemoveObject method or DeleteColumn method to remove that offending column in run-time?

RecordSource = Alias(Default)
Grid is just sub-classed from base classes
No, I haven't tried to delete the column during run-time, it's not that obtrusive yet. Atleast I was able to make it read-only.
I did have to hard code each column's ColumnOrder, because VFP made the new Column0 the first column in the grid. I was able to do this in the pageframe class. I just typed over the default column order and it stayed that way.

>
>This looks quite strange for me because I never seen such behavior of grid, though I did never used data environments with relations...
>
>>I'm using VFP 6.0 SP5.
>>
>>I've created a form with several tables related to each other in the Data Environment. Each of the parent tables has a unique id field that I set as the primary index. Each of the child tables contains a field that I set as a regular index and use for the parent table relationship.
>>
>>I created a pageframe class and placed several grids on the different pages so I can see where the record pointers are in each of the tables. I've also hard coded the ColumnCount and RecordSource in each of the grids and set the ControlSource for each column.
>>
>>Now the interesting part. VFP insists on inserting a Column0 in EVERY grid when I drop it on the form. When I run the application Column0 contains the unique id field used in the DE relationship. Anyone know why this happens or how to prevent it?
>>
>>One more interesting fact. Eventhough I marked each grid as ReadOnly in my class, when the pageframe is dropped on the form, the new Column0 is marked as NOT ReadOnly! I had to change every Column0's ReadOnly property on the form.
Mike Coop
MIU - Data Analyst III
Kemper a Unitrin Business
(904) 245-5949
mcoop@eKemper.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform