I have a grid on a form that I pass parameters to create the header names and control source for the columns. The grid is dynamic in that it can contain as many columns as it will handle.
The problem is that I want to add a sort routine to the headers' click events so that the user can sort by clicking on the column header. But, I cannot see how to dynamically add the code to the click event (at runtime).
The grid control initially has no columns, they are added based on the parameters passed. So, I cannot add the click event code at design-time.
Any ideas how to do this?
Any help is appreciated.
Thanks,
Jeff Elmore
jeffrey.elmore@unisys.com