Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird Grid Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00244397
Message ID:
00244420
Views:
14
>>>I have created a grid based on a table that hold color/size matrix information. Each row represents a different color and each field represents a different size.
>>>
>>>For example, lets say there is a bike, model# TK800, that comes in 2 sizes and 3 colors. My table would have 3 rows the first field in each row would store the color the second field would show the qty of that rows color for the first size and the third field would show the qty of that rows color for the second size.
>>>
>>>Anyway I have a grid based on this table and the colors and qty's show up great for each color and size.
>>>
>>>The functionality I am trying to get here is if they click on a particular cell in grid I want to show the individual serial#'s for that particular color and size in the matrix.
>>>
>>>I was thinking it would be cool to add a command button to each column and make the caption show the qty(the value of the textbox).
>>>
>>>I have been at this for quite some time without much luck....
>>>
>>>Does anybody have any ideas?
>>>
>>>Thanks,
>>>Paul
>>
>>If you always have few rows then it's doable: you should add bunch of commandbuttons to the column. Each button will have different caption, set it programmatically in run-time, and use Grid.DynamicCurrentControl setting to get right button to each row.
>
>
>I'm not sure where to set the button's caption. Basically what I want is for whatever the value would have been for the text box to now appear as the caption of the button. Wherever I try to set the caption the value is null at that particular time.
>
>I wouldn't think I would have more than 20 rows or colors.

I've never tried to add 20 buttons to the column, but who knows maybe it will work? You set button captions immediately after you get a cursor to show in grid (i guess you run some SELECT_SQL), just SCAN the cursor and set appropriate Button.Caption property.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform