>Form has parent and child grid controls, e.q. document and document rows.
>When child grid is active, it is desirable that current row in parent
>grid is distinguishable from others.
>
>I did the following things in parent grid control:
>
>1. added currec property
>2. .dynamicbackcolor = IIF( recno()=this.currec, rgb(0,0,128), this.backcolor)
>3. Afterrowcolchange event
> this.currec = recno()
>
>4. Beforerowcolchange event
> IF recno()!=this.currec
> this.currec = 1
> ENDIF
>
>However, this will not work properly: sometimes row is not highlighted at all, sometimes two rows are highlighted.
>How to do it ?
>Maybe it can be done when grid loses focus, but grid has not lostfocus event.
in the two rowcolchange events, add this.refresh after you set the currec property. This causes the grid to re-evaluate its column's dynamic properties and I think it will solve your problem.
Erik Moore
Clientelligence