Page 1 of 1

Como hacer focus en un row del Grid???

Posted: Wed Jun 19, 2024 4:20 pm
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

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

Posted: Wed Jun 19, 2024 4:21 pm
by jorge_riv
Me olvide de avisar uso: Harbour MiniGUI Extended Edition 24.06 (Standard)

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

Posted: Thu Jun 20, 2024 1:30 pm
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?

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

Posted: Thu Jun 20, 2024 3:25 pm
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 )

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

Posted: Thu Jun 20, 2024 3:33 pm
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())