Re: Trapping Mouse Click on a grid



No that's not what I mean. The Grid has a RecordSource, which is the name of
a table, a view, or a cursor. Each grid column has a ControlSource property
which contains the name of the field in the recordsource that populates the
column. Each control, normally a textbox, also has a ControlSource property,
always by default the same as the Grid.Column.ControlSource. These are as a
rule assigned automatically when the RecordSource has been set. From the top
you would than say:
Thisform.Grid1.Column9.Check1.ControlSource = 'invoice.inv_prt' or whatever
the field is named.
Whatever posessed you to call a grid 'Header1'?
By the way, there are standards in VFP programming for naming controls,
objects, and variables.
Se the Help index for: Naming conventions - objects.
-Anders

"TonySper" <tsperduti@xxxxxxxxxxxxxxxxxxx> wrote in message
news:mlyoh.20615$_X.9057@xxxxxxxxx
Anders,
If you mean RecordSource, yes, I have this set to the name of the
table that I open before I call the form.
Tony

"Anders" <anders altberg> wrote in message
news:uTKI9k0MHHA.4376@xxxxxxxxxxxxxxxxxxxxxxx
Have you added a ControlSource for the Checkbox
-Anders

"TonySper" <tsperduti@xxxxxxxxxxxxxxxxxxx> wrote in message
news:SSuoh.29036$%e7.27296@xxxxxxxxxxxxxxxxxxxxxxxxx
Olaf,
I am getting closer. I did
This.Columns(9).Sparse = .F.
THIS.Columns(9).ADDOBJECT("Check1","checkbox")
THIS.Columns(9).CurrentControl="check1"
Now the grid comes up with the entire column with the field check
marked but clicking the mouse on them does not change them. They all
stay checked.
How do I get the mouse click to toggle the check marks??
Thanks for all your help.
Tony

"Olaf Doschke" <b2xhZi5kb3NjaGtlQHNldG1pY3MuZGU@xxxxxxxxxxxxx> wrote
in message news:Oynzv5xMHHA.1240@xxxxxxxxxxxxxxxxxxxxxxx
False. I have tried
This.Column(9).Addobject("check1","checkbox")
This.Column(9).Activecontrol="check1"
Sorry, should have been CurrentControl

Another thing you might want to set is
Column(9).Sparse = .F.

Then you'll get a checkbox in every row, not only
the active row.

Bye, Olaf.









.



Relevant Pages

  • Re: Grid Control
    ... Setting the RecordSource="" didn't seem to work, ... table and adding these new fields to the grid depending on many different ... > the cursor and append the new content back into it. ... >> ControlSource and Column properties. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Trapping Mouse Click on a grid
    ... of the grid to HARVEY now and still trying to get it to work. ... The Grid has a RecordSource, ... Each control, normally a textbox, also has a ControlSource ... the active row. ...
    (microsoft.public.fox.programmer.exchange)
  • The control is read-only - why?
    ... I created a grid, the recordsource of which is a table. ... The grid does display the data of ...
    (microsoft.public.fox.programmer.exchange)
  • RE: Show controls when value is selected in combo box
    ... the form's RecordSource property into which data entered into the control is ... Are these hidden controls on a subform or the main form? ... post the ControlSource, RowSource, and BoundColumn properties, and the. ... >>> tblDisbursement is the record source for the hidden combo box. ...
    (microsoft.public.access.forms)
  • Re: Grid und RecordSource Zuweisung
    ... Dem GRID wird zuvor die RecordSource ... entzogen und nach der Erstellung der Tabelle wieder zugewiesen. ... When you want to preserve the previous settings, for example, in scenarios when the new record source has the same structure as the previous one, you can use the SPACEfunction set the RecordSource property temporarily to SPACE. ...
    (microsoft.public.de.fox)