Hi John,
Well most of the code resides in a "base grid" on which I 'base' the grids I'd use in a form and which the method that I proposed resides.
I you promise not to tell anybody, I'll admit that I hack the .vcx or the .scx to add the line I have to add to the click event of each headers. There's a perfect little utility for named browx that came a few months ago with the Advisor.
As a rule (my rule again) I limit the amount of code that has to put directly into contained objects for the sole reason that is such a pain to access them from the object inspector, that is why I put most of the specific code, like validation for example at the grid level.
If you are interested I'll show how I do that.
Kind regards,
Marc
>Hi Marc,
>
>Thanks for the reply. So, for grids would you use the grid builder to build your grids then add the code where needed?
>
>
>>>Hi Marc,
>>>
>>>How do you "call" the method from your header click event? When I define a grid class the column count at -1 so there is no columns to put the code in??
>>>
>>
>>
>>Hi John,
>>
>>this is the code I put in the click method of the header of each column of the instance of the grid.
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.