Re: Trapping Mouse Click on a grid
- From: "Anders" <anders altberg>
- Date: Tue, 9 Jan 2007 02:53:09 +0100
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 triedSorry, should have been CurrentControl
This.Column(9).Addobject("check1","checkbox")
This.Column(9).Activecontrol="check1"
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.
.
- Follow-Ups:
- Re: Trapping Mouse Click on a grid
- From: TonySper
- Re: Trapping Mouse Click on a grid
- References:
- Trapping Mouse Click on a grid
- From: TonySper
- Re: Trapping Mouse Click on a grid
- From: Dan Freeman
- Re: Trapping Mouse Click on a grid
- From: TonySper
- Re: Trapping Mouse Click on a grid
- From: Dan Freeman
- Re: Trapping Mouse Click on a grid
- From: TonySper
- Re: Trapping Mouse Click on a grid
- From: TonySper
- Re: Trapping Mouse Click on a grid
- From: Anders
- Re: Trapping Mouse Click on a grid
- From: TonySper
- Trapping Mouse Click on a grid
- Prev by Date: Re: Trapping Mouse Click on a grid
- Next by Date: Re: [VFP 9] strange problem
- Previous by thread: Re: Trapping Mouse Click on a grid
- Next by thread: Re: Trapping Mouse Click on a grid
- Index(es):
Relevant Pages
|