Como hacer focus en un row del Grid???

HMG en Español

Moderator: Rathinagiri

Post Reply
User avatar
jorge_riv
Posts: 86
Joined: Thu Nov 22, 2018 2:20 pm
DBs Used: DBF, MySQL,SQL SERVER, Oracle.

Como hacer focus en un row del Grid???

Post by jorge_riv »

De que forma puedo ir a un row determinado de un Grod??
Existe alguna forma de hacer Focus e ir a un Row del Grid, si preciono una opcion determinanda???
Si alguien tiene un ejemplo les agradesco
Gracias
User avatar
jorge_riv
Posts: 86
Joined: Thu Nov 22, 2018 2:20 pm
DBs Used: DBF, MySQL,SQL SERVER, Oracle.

Re: Como hacer focus en un row del Grid???

Post by jorge_riv »

Me olvide de avisar uso: Harbour MiniGUI Extended Edition 24.06 (Standard)
Red2
Posts: 281
Joined: Sat May 18, 2019 2:11 pm
DBs Used: Visual FoxPro, FoxPro
Location: United States of America

Re: Como hacer focus en un row del Grid???

Post by Red2 »

Hi,

This command is an example of setting the focus to a specific GRID control's row.

Code: Select all

SetProperty( "TheWindow", "My_GridControl", "Value", recno() )
Is this at all what you were asking about?
franco
Posts: 889
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: Como hacer focus en un row del Grid???

Post by franco »

If you want to set the column as well, use Red2`s code with recno(),column #
For column 3

Code: Select all

SetProperty( "TheWindow", "My_GridControl", "Value", recno(),3 )
All The Best,
Franco
Canada
User avatar
jorge_riv
Posts: 86
Joined: Thu Nov 22, 2018 2:20 pm
DBs Used: DBF, MySQL,SQL SERVER, Oracle.

Re: Como hacer focus en un row del Grid???

Post by jorge_riv »

Muchas Gracias.
Al final lo descubri y termine haciendolo asi:
@ X,Y GRID Grid_Ver_2 OF Panel_Ver WIDTH 470 HEIGHT pnH-148 ;
HEADERS xHead WIDTHS xWid JUSTIFY xJust FONT ;
'Comic Sans MS' SIZE 8 BOLD BACKCOLOR WHITE ;
IMAGE x_image MULTISELECT ITEMS {} VALUE {nRowVer};
DYNAMICBACKCOLOR {,{|x|IIF(EMPTY(x[3]),{249,255,207},{83,255,20})}, ;
{|x|IIF(EMPTY(x[3]),{249,255,207},{83,255,20})},;
{|x|IIF(EMPTY(x[3]),{249,255,207},{83,255,20})},};
ON CHANGE Limpiar_Ver_2();
ON DBLCLICK (nRowVer:=This.Value,Ver_Grid_2_Activar_3_ON())
Post Reply