>>Happy Holidays Everyone!!!
>>I have a class that is made up of a form with a grid in it.
>>the grid has 1 column. When I instatiate the object, I put
>>the right number of columns in the grid. The search works fine, but
>>what I am tring to do is to on the fly handle the sort. For example,
>>Lets say I send 6 Parameters to the class, it will put six columns in the grid.
>>But what I want to do is also place thisline of code in to the click event of each header while I am Creating the form on the fly:
>>
THISFORM.r_DoTheSort(SomeIndexVariable)
>>So I guess the million dollar question is:
>>Is it Possible to Add code to the Click event of the header while trying to create it on the fly
IF the form I am referencing is classed?
>>If it is possible, How can I do this?
>>
>>Thanks in advance
>
>Leroy,
>One way is to have in your class as many columns as you think you will need. Add the code to the Header object at design-time. At run-time, pass in the parameters for the columns you will actually need and use RemoveObject to get rid of the extra columns...
... Or set ColumnCount to the number of actually used columns ?