Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Checkboxes in a Grid
Message
From
12/01/2004 11:57:48
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00866018
Message ID:
00866023
Views:
19
The cursor from a SELECT-SQL is read-only. You could use an updatable view instead.

HTH

>I have a grid which is populated by a cursor. The grid has 4 columns and the last column is a checkbox which is checked if the logical field it is bound too is T or F. What I would like to do is to enable the checkbox so that you can uncheck or check. When I click a button it will then replace the values in the table from which the cursor was generated. The problem I have is that the checkbox does not check or uncheck. It is frizen for some reason. I know how to create the remaining syntax for replacing the data it is just that I cannot select or deselect the checkbox.
>
>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
>
>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
>
>
>Can somebody help me please?
Previous
Reply
Map
View

Click here to load this message in the networking platform