Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid acts as Readonly
Message
De
10/06/2003 06:46:47
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00798198
Message ID:
00798281
Vues:
47
Hello Cyrus.

I have the following in thisForm.Setgrd() event, which I run from the Init() event of the form:

* -----------------------------------------------------------
thisForm.grd.RecordSource = 'Bill_Cus'
thisForm.grd.grcSelect.ControlSource = 'select'
thisForm.grd.grcAcc.ControlSource = 'Acc_Id'
thisForm.grd.grcLast.ControlSource = 'Last_Name'


This is what is causing your grid to be ReadOnly. You need to specify the ControlSource as Alias.Field to change this behavior.

I have to have this because I need to build the files from scratch when I build the data, so during the creation of the files, I put all the above to "" to decouple the grid from data files.

Have you considered doing what I call a "Safe Select"? Build your grid's RecordSOurce in the Form Load using CREATE CURSOR. Then, when you have to rebuild the file from scratch, you use code like this:
*** Rebuild the cursor used as the recordSource for the grid
SELECT MyRecordSource
ZAP
SELECT Yada, Nada, Blah FROM SomeTable WHERE SpmeCondition ;
	INTO CURSOR Temp NOFILTER
SELECT MyRecordSource
APPEND FROM DBF( 'Temp' )
USE IN Temp
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform