Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid acts as Readonly
Message
From
10/06/2003 06:46:47
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00798198
Message ID:
00798281
Views:
50
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform