Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActiveRow property in a Grid
Message
De
24/07/1998 14:39:18
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00121025
Message ID:
00121147
Vues:
18
>Cetin,
>
>Thanks for the quick response. I tried putting code in the AfterRowColChange method, but it was not firing. When I looked in Help, it said this method would not fire unless the When method of the cell returns .T., but I still couldn't get this to fire.
>
>So then I had debugger and my application visible at the same time on my screen. Even when the grid has focus, debugger still displays zero?
>
>I will try to explicitly set focus to see if this helps, but any additional thoughts are always appreciated.
>
>Kind Regards,
>
>Mat
Now Mat,
I should understand something clearly. Grid.afterrowcolchange fires whenever you're able to change row or column in a grid. So it's right first ..grid.columns(x).control(y).when should return .t. and could gotfocus and in turn afterrowcolchange fires. You cannot make it fire if you can't change rowcol. It would be something like :
Grd.when
Grd.gotfocus
Grd.ctrl.when
grd.ctrl.gotfocus
grd.afterrowcolchange

You can see the events firing by turning event tracing on in debugger. So many events fire in between so just select needed ones to trace (also you could send output to a file too).
As you see a control must gotfocus for afterrowccolchange to fire. I wonder if debugger expression is wrong. If you don't use "name" clause of "do form" then use SCX's name for form object :
SCXNAME.grid1.activerow
SCXNAME.grid1.activecolumn
SCXNAME.grid1.columns(SCXNAME.grid1.activerow).value


All these debugger values will change as you walk in grid (grid has focus - debugger watch window is visible). Good luck.

BTW when debuger is on grid operations are really slow (especially when activerow is queried).

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform