Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Grids
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00032435
Message ID:
00032437
Views:
37
>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.

I've created a base grid with 25 columns although it is unlikely that you'd ever display that many. In each Header's .Click method, there is a call to a method of the grid to reorder itself so the code only exists once. The header passes up to this method the tag that needs to be set. Drew Speedie uses something like this in his framework but only uses 10 columns which probably is enough.

When you set the .ColumnCount property at runtime to the desired number of columns, the rest are gone.

Steve
Previous
Reply
Map
View

Click here to load this message in the networking platform