Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crazy mixed up Grid
Message
From
29/05/2002 17:17:24
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00662722
Message ID:
00662743
Views:
21
This message has been marked as a message which has helped to the initial question of the thread.
>I am using a grid class as paraphrased below:
>
>with logrid
>  .ColumnCount = 3
>  .RecordssourceType = 1
>  .Recordsource = 'SomeCursor'
>  .columns(i).ControlSource = 'SomeCursor.Field3'
>  .columns(2).ControlSource = 'SomeCursor.Field1'
>  .columns(3).ControlSource = 'SomeCursor.Field2'
>endwith
>
>...
>
>Function Form::Load
>  this.ViewRequery()
>
>
>function ViewRequery
>thisform.Grid1.recordsource = ''
>lcSql = 'select field1,field2,field3 from sometable into cursor SomeCursor'
>thisform.Grid1.recordsource = 'SomeCursor'
>
>
>
>After the first requery of the cursor all is well, however on subsequent requeries the columns revert to cursor field order. If I re-assign column controlsources after the requery all is well again. What am I missing?
>
>Glenn

Glenn,
Just a guess, but, how about rearranging the order of your fields in your select statement? Or put the column order at the top in your function.
HTH,
Winn Pauley
Previous
Reply
Map
View

Click here to load this message in the networking platform