Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Grid
Message
De
18/02/2000 21:11:10
 
 
À
18/02/2000 10:29:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00334062
Message ID:
00334410
Vues:
20
Hi, Karsten!

Once you assign the Grid Recordsource, VFP will Drop all the Columns and child (Control) Objects...
and then Recreate the default one with current field list.... (if you set field to field1, field2, field3...)

So, it must take long time to do so and you lose everything code if you put directly on grid... ~_~

At file section, there is a Browse Table (bwtable.zip ) which is an example of using a grid to show data in Current Directory!
What I need to mention:
With ThisForm.Grid1
  .RecordSource = []
  .ColumnCount = -1 && Drop ALL Columns first..
  .RecordSouce = tcRecordSource  && So that the Column WIDTH will surely follow the new alias..
  For ix = 1 to .ColumnCount
    .Columns[iX].RemoveObject("text1")
    .Columns[iX].AddObject("newText1", "myTextClass")
    .Columns[iX].newText1.Visible = .T. && any Object Created by AddObject is DEFAULT INVISIBLE!!
  Endfor
  .Refresh
EndWith
SO, you can simply keep code as a new class and put them in grid at INIT ^_^"


>Why does this line takes such a long time to be executed in the Init of my grid?
>
>this.RecordSource = tcRecordSource
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform