Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid
Message
 
 
À
21/01/1999 04:38:09
Senna Dwipayana
Indo Rebel Apparel Cv
Bandung, Indonésie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: Grid
Divers
Thread ID:
00178390
Message ID:
00178488
Vues:
30
>Another Grid Problem,
>Grid.Init Event
>
>This.recordsource='mytable1'
>This.ColumnCount=3
>
>Grid.Refresh
>This.RecordSource=This.RecordSource
>
>LOCAL lcCol
>THIS.column1.Width=40
>FOR i=2 TO This.ColumnCount
>lcCol="This.Column"+ALLT(STR(i))
>&lcCol.Width=100
>ENDFOR
>
>Grid1.ProgrammaticChange
>Parameter cSelect
>Do Case
>Case cSelect=1
>Select * From myTable1 Into myTempCursor
>Case cSelect=2
>Select * From myTable2 Into myTempCursor
>Endcase
>DO vfpxtab WITH 'mytable'
>This.Refresh()
>
>And Last Column of this grid changed it's width to 75 even though I put Column Width on grid.refresh()
>When I trace it, no problem with the code.
>Can someone help me?
>
>TIA

IMO, as Edward have said, you should move the code in the grid's Refresh method to grid's ProgrammaticChange event. In otherwords:

Grid1.ProgrammaticChange()
LParameter cSelect
This.RecordSource=""
Do Case
Case cSelect=1
   Select * From myTable1 Into myTempCursor
Case cSelect=2
   Select * From myTable2 Into myTempCursor
Endcase
DO vfpxtab WITH 'mytable'
This.RecordSource='mytable'

THIS.column1.Width=40
FOR i=2 TO This.ColumnCount
   lcCol="This.Column"+ALLT(STR(i))
   &lcCol.Width=100
ENDFOR
THIS.Refresh()
It's "my" world. You're just living in it.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform