Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid RecordSource
Message
De
14/01/2008 11:40:52
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/01/2008 10:57:24
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01281589
Message ID:
01281612
Vues:
15
>MyGrid.RecordSourceType = Alias.
>
>MyGrid.RecordSource:
>
>
>AppointmentTypeSets.Colors,FromDate,ToDate,Day,StartTime,EndTime
>
>
>The grid is not populating, though the Alias has records.
>
>If I just put this:
>
>
>AppointmentTypeSets
>
>
>Then the grid populates, but not in the field order that I want.
>
>I now remember why I started to not like grids many years ago. They are a pain to work with.

Jay,
You're trying to use grid like a listbox.
local ix,lcColumnSources
lcColumnSources = 'Colors,FromDate,ToDate,Day,StartTime,EndTime'
alines(aCols, m.lcColumnSources,.t.,',')
with thisform.myGrid
  .Recordsource = 'AppointmentTypeSets'
  For ix=.ColumnCount To 1 Step -1
    If Ascan( aCols, Justext(.Columns( m.ix ).ControlSource), 1,-1,1,15) = 0
      .DeleteColumn(m.ix)
    Endif
  Endfor
  For ix=1 To .ColumnCount
    .Columns(m.ix).ColumnOrder = ;
      ascan( aCols, Justext(.Columns( m.ix ).ControlSource), 1,-1,1,15)
  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