Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class property does not respond in form
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00467250
Message ID:
00467469
Vues:
13
Hi!

>But I dont control the order in which Fox does things. Do you have any suggestions where to act?
>Other things like code written in the same grid class works fine.

Code written in grid class works, but code inside of grid controls (columns, headers and column controls) will disappear when grid reconstructs self. When grid reconstructs self, it just removes all previous columns and adds new columns, that, of course, are default and no way to specify properties/methods of the newly added column controls (pity!). Following is a list of cases when reconstruction occurs:

- RecordSource property assignment when it is not empty. To change record source just assighn empty string to it, than assign new record source again.
- Grid cursor closed and opened again, or view used for grid is requeried, or SPT cursor requeried. In such case, before query/close assign empty string to RecordSource property, make all changes/query with data and than assign RecordSource back again.
- ColumnCount of grid is set to -1. In such case no workaround - just do not use it. If you make a class wich base on the grid class and use it on the form, you will just get an error that you cannot remove class from grid after such assignment.
- When you open form with grid and grid RecordSource (assigned in design-time) does not exists (not opened yet), grid moight reconstruct self too. In such case open all required data in the LOAD event or such before grid Init method fires.

Just look into the form's code, there might be also manual grid reconstruction code, that is a case too ;)

>
>
>
>>Hi!
>>
>>Somewhere in your code grid reconstructs self causing dropping all it settings to default controls and property values. Probably this because you do not opened grid cursor before grid is initialized, or refreshed grid cursor without emptying recordsource property before that.
>>
>>>I have a grid with a header forecolor property not default.
>>>This property is not seen in the form version of the grid.... Has anyone seen this behavior before??
>>>The grid is in a container which is used on a form.
>>>(subsequent relevant properties is set to default)
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform