Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid RecordSource
Message
From
14/01/2008 11:40:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
14/01/2008 10:57:24
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01281589
Message ID:
01281612
Views:
10
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform