Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid doesn't display check box
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid doesn't display check box
Divers
Thread ID:
00662746
Message ID:
00662746
Vues:
57
In design time, the grid's column 1 displays the check box. I have the sparse property set to .F., which I know displays the check box for the entire column.

I also have a drop down combo box which the user has to select something from before any data will appear in the grid below.

The drop down is a list of modules, such as A" for Accounts Payable, AR for Account freceivable, etc. So, once the user selects a module, such as "AR" and hits the ENTER key, thus executing the LostFocus code. The result of the LostFocus code is that you fill up the grid with the tables found in that accounting module.

There are 2 columns in the grid at design time. The 1st column is a CheckBox which is used to allow the user to select a Table(s) to be Indexed. The 2nd column lists the appropraite tabels for that module.

The problem: The check box does not appear at all. I have the following code in the LostFocus of the combo box. Only a textbox appears. I placed the grid code into the lsotfocus since the grid lost whatever columns and good stuff it had presented in design time.

Local lcModule
*lcModule = SPACE(0)
lcModule = LEFT(This.Value,2)
WITH ThisForm
IF NOT EMPTY(lcModule)
SELECT ;
.F. AS Selected, ;
Table ;
FROM SysMTbls ;
WHERE SysMTbls.ModID = lcModule ;
INTO CURSOR tmpTables
.grdTables.RecordSource = "tmpTables"
.grdTables.ColumnCount = 2
.grdTables.Column1.Width = 75
.grdTables.Column1.Header1.Caption = "Select"
.grdTables.Column1.AddObject("chkSelected", "cc_chkBox")
.grdTables.Column1.chkSelected.Visible = .T.
.grdTables.Column1.Sparse = .F. && Make the check Box show up in all rows.
.grdTables.Column2.Header1.Caption = "Table Name"
.grdTables.Column2.Width = 120
.Refresh()
ENDIF
ENDWITH

I don't know how to put the code into this UT note, so if someone knows how to do that, I'd also appreciate knowing.

Thanks,

Cecil
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform