>> procedure mygrid.column1.header1.click
>> do tag_it with this.parent.parent.RecordSource, justext
>> (this.parent.ControlSource)
>> thisform.refresh()
>> endproc
>
>If I do not know how many columns at design time... how can I put that lines of code in all header click events ?
You can put that code in a Header subclass and manually add the headers when the grid is bound to its data. If you are using VFP8, use the MemberClass/MemberClassLibrary properties of the grid to skip this step.