- Marcelo Peñailillo
- PowerBuilder
- Tuesday, 15 October 2024 04:47 PM UTC
Hi.
In any DatawindowChild of my application the row with the corresponding value in the data of the DatawindowChild is selected. In previous versions of Appeon PowerBuilder it correctly selected the corresponding row.
Code:
// this code execute post retrieveend on a datawindow
// an_VALUE have a valid value and an_POS is > 0, example 6, but datawindowchild always select only first row
Datawindowchild WND_CHILD_SGA
string an_VALUE
long an_POS
if this.GetChild( "liq_lks_cod_sub_grupo_activo", WND_CHILD_SGA) = SUCCESS then
WND_CHILD_SGA.settransobject( sqlca )
WND_CHILD_SGA.retrieve( "LKS_COD_SUB_GRUPO_ACTIVO" )
an_VALUE = trim(this.GetItemString( 1, "liq_lks_cod_sub_grupo_activo"))
an_POS = WND_CHILD_SGA.find( "lks_mmic_code='"+an_VALUE+"'", 1, WND_CHILD_SGA.rowcount())
if an_POS > 0 then
WND_CHILD_SGA.SetRow( an_POS )
WND_CHILD_SGA.Selectrow( 0, false )
WND_CHILD_SGA.post Selectrow( an_POS, true )
WND_CHILD_SGA.post ScrollToRow( an_POS )
end if
end if
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.