Hi!
Make a header class and replace the default header by your own header class with custom code in the Click. For example:
DEFINE CLASS MyHeader as Header
PROCEDURE Click
this.parent.parent.OnHeaderClick(this)
ENDPROC
ENDDEFINE
Than add OnHeaderClick method to the grid class, so you will be able to catch header clicks there.
Finally, when customizing your grid in run-time:
...
set procedure to MyHeaderDefinitionPRG ADDITIVE
for i=1 to this.ColumnCount
this.Columns(i).AddObject('Header2','MyHeader')
...
endfor
...
HTH.
>I am creating a form with a grid and I need to set all the properties of the grid on the fly.
>It is easy to change the caption property:
>ThisForm.Grid1.column1.header1.caption = "Name"
>
>But how do I change the Click Event?
>
>Thanks
>Einar
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.