Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid loosing its properties
Message
From
14/03/2017 10:23:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01649013
Message ID:
01649035
Views:
49
>The two grids have different names and the recordsource (grid) and controlsoúrce (columns) are
>definitely not changed.

That is the problem. If you are reselecting into its record source then it would lose the source in between and the grid would be rebuild with defaults. Prevention is very simple:
local lcRecordSource
lcRecordSource = thisform.myGrid.RecordSource && save the source
thisform.myGrid.RecordSource = '' && temporarily set to empty string

* do your reselect into cursor here
* and reassign the source

thisform.myGrid.RecordSource = m.lcRecordSource
Ç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
Next
Reply
Map
View

Click here to load this message in the networking platform