Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Grid Generation
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00057440
Message ID:
00057452
Views:
26
>working on a grid class which will handle "building" itself dynamically.
>(not using a builder, as i want to have it as a class)
>
>Basically, my plan is to be able to drag a table or view from the
>DataEnvironment onto a form and NEVER <s> have to touch it again.
>
>Here are my current needs:
>
> 1. For the columns' current control(s) i need to be able to place code
>into several methods of the default control (ie. the textbox). How do you
>do this? Or is it possible to have the dropping of the table/view use my
>class of textbox.
>
> 2. "Intelligently" use the correct control based upon the columns' source.
>(ie. checkbox for logical, ...)
>
>kim

Have some of the similar needs and this is how I've done it. I'm sure that you'll get other suggestions. My grid has a property called aColumns which is an array of settings for a column definition. You can either manually fill this array or use =AFIELDS() with DBGETPROP() to get other characteristic automatically and build it that way. I have a method called .MakeColumns that will use the above mentioned way to construct a grid from a view. I then have a method called .BuildMe which reads thru aColumns and constructs the grid. Works good. To start this, I have a subclassed grid which has 25 predefined columns.
I have header code to sort and it will do incremental searching as I've removed the Text1 standard control with a custom textbox control.

Steve Despres
Previous
Reply
Map
View

Click here to load this message in the networking platform