Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid doesn't display check box
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00662746
Message ID:
00662750
Views:
25
You can show code in preformatted text by using <pre> and </pre> tags.

As far as the checkbox problem goes, the grid column has a textbox as the currentcontrol by default. You either need to remove that textbox, or set the column's CurrentControl to the checkbox.

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform