Re: GRID Click Event Fires Only Once



Hello Dan,
thanks for the advice - but it doesn't work. Here the steps I make:

PART1:
I have ha GRID on a form set to visible=.f.
I open a table TESTTABLE
I bind the GRID to the table with GRID1.RECORDSOURCE= "TESTTABLE"
and make the GRID visible.
Now I have a little routine in GRID1 -> COLUMN2 -> TEXT1 -> CLICK
THIS CLICKEVENT ROUTINE NOW WORKS FINE

PART2:
next I tell the the GRID that the RECORDSOURCE is "" with
GRID1.RECORDSOURCE=""
now I close the table with CLOSE DATABASE

PART3:
I do the things described in PART1 again and the CLICKEVENT doesn't do
anything anymore and I have the question: WHAT WENT WRONG?

Greetings Gerhard



"Dan Freeman" <spam@xxxxxxxxxxxxx> schrieb im Newsbeitrag
news:%23taIHck0IHA.4040@xxxxxxxxxxxxxxxxxxxxxxx
The event still fires, but your code is gone because you've closed the
grid's data source. When you do that, the grid deconstructs.

Set the recordsource to "" before closing the table. Or, better yet, don't
close it. <g>

Dan

Gerhard Gentele wrote:
Hello Friends,
now I started using a GRID. It has two columns and uses as
RECORDSOURCE a DBF table. With a click i can change a .T. to .F. and
back again. Everything works fine until I close the table and make
the GRID unvisible. Starting everything again the same way brings
back the GRID, but the ability to fire an EVENT (such like a CLICK or
a RIGHTCLICK) is not possible anymore - it's gone...
CAN ANYBODY TELL ME WHY?

Greetings Gerhard




.



Relevant Pages

  • Re: GRID Click Event Fires Only Once
    ... When you close a grid's recordsource, it deconstructs. ... Your best bet is to take the code *out* of the grid and put it in a textbox ... anything anymore and I have the question: ...
    (microsoft.public.fox.helpwanted)
  • GRID Click Event Fires Only Once
    ... It has two columns and uses as RECORDSOURCE a ... DBF table. ... Everything works fine until I close the table and make the GRID unvisible. ... anymore - it's gone... ...
    (microsoft.public.fox.helpwanted)
  • 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)
  • Re: Trapping Mouse Click on a grid
    ... Each grid column has a ControlSource property ... which contains the name of the field in the recordsource that populates the ... Each control, normally a textbox, also has a ControlSource property, ... the active row. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Datenquelle wechseln
    ... RecordSource des Grid auf die neue Datei einstellen ... Damit ist das Grid nie ohne RecordSource. ...
    (microsoft.public.de.fox)