Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column DataBinding feature I added to my grids...
Message
From
12/12/2009 21:21:21
 
 
To
11/12/2009 21:00:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01438702
Message ID:
01438803
Views:
44
>>I just wanted to share some code from an idea I implemented to create and easy way to programmatically bind columns in my grids to a cursor, with a few other cool tricks too, like calculated fields and Casting to control decimal formats.
>>
>>See what you think... http://therealmattslay.blogspot.com/2009/12/grid-column-databinding-feature-for-vfp.html
>>
>>.
>
>Matt,
>Isn't it easier just to simply assign the recordsource. Columns would be automatically bound in the order they are in cursor.
>Cetin

Well, sometimes my cursor has columns that I do not want to display in the grid (primary keys and foreign keys and other data that I just don't want to show).

Plus, I may also want calculated columns, like (total = qty * price) (rate = laborcost / labor hrs). The columns required to do the calculations are in the cursor, but not the total or rate columns. I could add them to the sql , but who knows if this is good or not, if you do not have access to change SQL query.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform