Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00403742
Message ID:
00404393
Views:
9
>>>I have a problem with a grid that has 10 columns and depending on a variable based on the first column, needs to have less columns (sometimes as little as 2).
>>
>>Can you describe this a little more, please? I'm not sure what you're trying to get, when is the variable evaluated, what is it, and does it have to do with the field value for that row?
>
>Mike:
>
>The application is for the Garment industry.
>Some styles come in 3 sizes, example Small, Medium, Large. Some come in 5 sizes, example 38, 40, 42, 44, 46. Some in 10 sizes.
>The variable is evaluated based on the first column key wich has a relation set to a size code table, determining how many they are.

Rather than having this as a single grid, split it into two grids - one grid used to select the garment; one garment to a row, and then a seond grid that displays a row per 'size' - that way you can have a standard form that conforms to your display, and doesn't get affected if suddenly a garment becomes avaiable is 17 sizes, rather than the current maximum of 10. I'd normalize the underlying table structure as well; rather than a 'garment' table with a number of columns per size, slit it to two tables - a garments table, which has a unique PKey/garment, and a child table of garment sizes, with a foreign key identifying the garment record it belongs to, and a column identifying the size. This has the added benefit that the 'columns' don't have to have fixed names, either; your size field can contain Small, Medium, Large, XL, or a range of numbers, or arbitrary codes like shoe widths or cup sizes or whatever.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform