>>Thanks for the answers about grid header colouring.
>>Now, I want code to execute in the header.click event.
>>
>>I build the grid in code, and the underlying results can change. If they change, any code that I added in the clikc event of the header goes way. I need to trap the click and execute some code if user selects it.
>>
>>How do I add code to the grid header after it is created?
>>Mike
>
>You can use BINDEVENTS()
I don't fully understand that. This is what i.ve tried.
WITH .column6
.ALIGNMENT=0
.CONTROLSOURCE=lcSource+'.'+'adjUnits'
WITH .header1
.CAPTION='Adj Units'
.ALIGNMENT=7
.BACKCOLOR=RGB(255,255,128)
BINDEVENT(this,'Click',thisform,'GetAdjUnits')
ENDWITH
.BACKCOLOR=RGB(255,255,128)
.WIDTH=60
ENDWITH
This is a snippet of code from a method in the grid called setgrid. This is called after the data is gathered prior to populating it. It is also called after the grid is empty to keep the grid visinle and looking the same as opposed to an empty box.
I guess I need a bit of a hint on how to use bindevents
TIA,
Mike