Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Column DataBinding feature I added to my grids...
Message
De
13/12/2009 10:53:52
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
12/12/2009 21:21:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01438702
Message ID:
01438826
Vues:
48
>>>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.

Hmm, still what I said applies:) Create your SQL placing those columns you don't want to show being at the end. You can use less columns than the fields and simply set only calculated columns' controlsources.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform