Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checkbox not working in my grid
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Checkbox not working in my grid
Divers
Thread ID:
00866309
Message ID:
00866309
Vues:
57
Hello

I have a table named modacad from which I create a cursor using an SQL statement. The cursor is then the source for the grid. The cursor has 4 fields and the last field is a logical field. Within the grid I display the results of the cursor and I have bound the 4th column as a checkbox within the grid. Whether the logical field in modacad is T or F will determine whether the checkbox is checked.

This works fine and displays the correct information.

The problem I have is that I want to tbe able to check or uncheck the checkbox and then click a button to update the cursor and then match those records in the modacad table and replace the logical values based on whether I have checked or unchecked. I know how to do this but the problem I have is that the checkbox in my grid will not allow me to check or uncheck as if it is disabled.

Can anybody help me. I have the readwrite command in my cursor. Its the checkbox which is not working.

Here is my code:
SELECT modacad.key3, modacad.key4, modacad.moc011, modacad.mochk009 ;
FROM "U:\Data\modacad.dbf" ;
WHERE modacad.key4<>'TECHNICAL' ;
ORDER BY key3 ;
INTO CURSOR result READWRITE 

with thisform.grid1
.columncount = 4 
.RecordSourceType = 1
.RecordSource = 'result'
.column1.controlsource = 'UPPER(result.key3)'
.column1.header1.caption = 'Design No'
.column1.width=100
.column2.controlsource = 'UPPER(result.key4)'
.column2.header1.caption = 'Design No'
.column2.width=130
.column3.controlsource = 'UPPER(result.moc011)'
.column3.header1.caption = 'Description'
.column3.width=370
.column4.addobject("Chk1","Checkbox")
.column4.CurrentControl="Chk1"
.Column4.chk1.Caption = ""
.Column4.Sparse = .F.
.column4.width=110
.Column4.controlsource = 'result.mochk009'
.column4.header1.caption = 'Final Garments'
ENDWITH
Many Thanks in Advance
Neil Lewis
IT R&D Manager
Velmore Ltd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform