Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid column recordsource
Message
De
29/05/1998 05:32:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00102983
Message ID:
00103007
Vues:
23
>Grid problem...I set my grid column recordsource during design, set bound to .t. and set text1 to same recordsource as the column. the recordsourcetype for the grid is set to an updatable cursor and recordsourcetype is set to 1(alias). before I run my query i set the recordsource to "" then run the query and create the updatable cursor then set the recorsource to "mycursor" to retain grid formatting I worked so hard setting up. The formatting of the grid stays intact, but somehow my recordsource for my grid columns is getting changed and displaying fields in the grid incorrectly. I looked in the debugger for the recordsource for the grid columns and somehow the columns recordsource is getting changed to another field name of the cursor. Any ideas as to what is going on?
>
>Any suggestions greatly appreciated!
>
>john.
John,
Setting grid recordsource to "" then setting back sometimes doesn't give the desired result. Changing of records is somewhat related to the grid is filled with the next available column when controlsource is empty. To ensure you get it all be sure columncount fits first. Then do something like :
* Custom grid method for changing recsource
lParameters cNewSource
with this
  .recordsource = cNewSource
  .columncount=fcount(cNewSource)
  for ix = 1 to .columncount
    .columns(ix).controlsource = cNewSource+"."+field(ix,cNewSource)
  endfor
endwith
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