Hi Ed,
>Since you really can't add code directly at runtime, the best approach would be to create a subclass of the Column and header classses that contain the necessary Click() method code, and then programatically add instances of the Column subclass to the grid or a subclass of the grid.
Just to add something: It is common a common design method to create SubClasses Header and Column (ect.) objects using DEFINE CLASS, and the code for say the clicked event of a header looks like:
This.Parent.Parent.HeaderClicked(this)
And then put all the code directly into the grid class. This will reduce the number of Code Based classes to say 1 of each baseclass.