>I have created a grid that resets the order of a table when the header of the column is clicked. I did this using the Grid.column.header.click() event.
>
>Is there any way I can create a grid to work this way at run-time? I don't always know at design time how many columns there will be etc. As far as I know I can't subclass column or header or can I ?
>
>Any help appreciated.
Create a grid class with more columns than you will need (10?) and a custom grid property called NumCols. Next set all the columns to the correct code in column and header. (Tedious, but you only have to do it once.) In your init, set your grid columncount property = NumCols, the number you actually want to see. This way, the "extra" columns are hidden to the viewer.
HTH
Barbara