Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid columns controlSource
Message
From
18/07/2000 18:58:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/07/2000 10:37:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00392786
Message ID:
00394096
Views:
11
>Pressing 'delete' is what got me into this mess :), along with the stupid wizard of course.
>
>I just can't figure out why the controlSource on each column is being ignored completely (see original post).
>
>Thanks for all of the input,
>
>steve


Steve,
If not in code then I suspect grid cannot find its recordsource thus populate from table-cursor in active workarea. It would be the case if you set Recordsource=(none) after builder sets it too. It behaves with a hierarchy that a recordsource must exist in order to controlsources have assignments and controls of columns' inherit from column.controlsources.
Just use the builder and add-delete your columns to your taste. Then you might simply remove builder added table from your DE. BUT do not change recordsource property. Controlsources would go mad as you do and set to (none). Also be sure recordsource alias and any controlsources that you refer to exists before grid.init fires (typically form.load - though you might set later in code anywhere and use designed grid as a template). Otherwise what you get is generally a blank grid.
* Current recordsource = 'mydifferentstructuretable'
with thisform.myGrid
 .ColumnCount = -1 && Reset. Try w/o this
 .RecordSource = 'mytable'
endwith

* Blow 2 code portions are not identical
* Current recordsource = 'myoldtable'
with thisform.myGrid
 .RecordSource = 'mytable'
endwith

with thisform.myGrid
 .RecordSource = ''  && preserves formatting 
                     && but is different from setting to (none) in designer
 .RecordSource = 'mytable'
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