Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid problem
Message
 
 
À
02/09/2013 05:54:46
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01581827
Message ID:
01581834
Vues:
75
J'aime (1)
>Hi,
>
>I have a form with a tabe and a grid, the grid's Column and Header properties and the Control Sourse
>are setup in the init event as follow:-
>
>The table is open in exclusive because I need to ZAP it in the INIT event.
>In some case, I need to close the table and re-open it, when I close the table and re-OPEN it
>the grid control become blank, all properties are gone.
>
>Why ?
>
>How can I re-Open the table without reset the grid control properties ?
>
>Please advise.
>
>Thanks.
>
>
>* INIT Event
>WITH thisform.Pageframe1.Page1.grdCuslot 
>		.RecordSource = "cuslot"
>		.ReadOnly = .T.
>		.DeleteMark = .F.
>		.GridLines = 3
>		.HighlightStyle=1
>		.HighlightBackColor=RGB(233,210,255)
>		.HighlightForeColor=RGB(0,0,0)
>		.Column1.ControlSource="cuslot.cuslotno"
>		.Column1.Header1.Alignment = 2
>		.Column1.BackColor =RGB(196,255,196)
>		.Column1.Header1.Caption="Lot No."
>		.Column1.Header1.FontBold =.T.
>		.Column1.Header1.FontItalic = .T. 		
>		.Column1.Width = 120
>	
>		.Column2.ControlSource="cuslot.itmcode"
>		.Column2.ReadOnly=.T.
>	                 Column2.Header1.Caption="Item Code"
>		.Column2.Header1.FontBold =.T.
>		.Column2.Header1.FontItalic = .T. 
>		.Column2.Width = 100	
>		
>		.Column3.ControlSource="cuslot.packing"
>		.Column3.Alignment = 2	
>		.Column3.Header1.Caption="Packing"
>		.Column3.Width = 90
>ENDWITH
>
Before closing the underlying table unbind the grid using RowSource = '' line and then re-bind with your current code again after the table is opened again.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform