Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A generic grid
Message
 
To
30/05/1997 22:40:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00034323
Message ID:
00034505
Views:
31
>In my application I need a generic grid class with recordsourcetype = SQLstatement. There are a lot of tables and a series of results need to be retrieved and displayed in grid (nomodify). All SQL statements are based on a date value. SQL series are complex to accomplish in view designer, most of them need a series of SQL. Setting recordsource to last SQLstatement does populate the grid. At this point how could I set the column widths and inputmasks, formats based on original table properties. I have code to do this for a table (dbgetprop(), cursorgetprop() are used) but after a series of concurrent SQL select how could I reach the original tables' properties on the fly ?
>For example if "select ... from anothercursor into cursor Gridcursor" is passed as a parameter and 'anothercursor' is a cursor, how could I know the original table(s) used in this query.

Hi,

I've done this many times and am working almost exclusively with views on my current project. I have a class that goes with each form which has the views defined. These views are dynamically loaded into the DE of each form. For the grid, I have a method called .AddColumnToGrid which accepts parameters such as the controlsource, format, inputmask, column width etc. If you have a field from a table in your view, then some of the parameters can be filled via a call to DBGETPROP, but if you need to fill things like the format and input mask your self, you can. When the views are requeried, the last view becomes the record source for the grid. Works just fine.

Steve Despres
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform