Hello Kent
I use a set_grid method in such a case which works like this:
with thisform.grid1
.columncount = 5
.readonly = .t.
.left = 20
.top = 20
.height = 200
.width = 450
.scrollbars = 2
.deletemark = .f.
.recordsource = 'curMyCursor'
with .column1
.header1.caption = 'Account'
.controlsource = 'curMyCursor.account'
.columnorder = 1
.width = 90
endwith
with .column 2
.header1.caption = 'Descripcion'
.controlsource = 'curMyCursor.accdesc'
.columnorder = 2
.width = 120
endwith
etc
endwith
Notice the columnorder clause. The user can change the grid as she pleases but
a call to this method puts things back the right way.
I use this method every time a change in the underlying cursor is necessary,
such as when it comes from a sql clause
thisform.grid1.recordsource = ""
select * from accounts into cursor curMyCursor......
thisform.set_grid()
Regards
Rafael Copquin
----- Original Message -----
From: Kent Belan
To: [EMAIL PROTECTED]
Sent: Tuesday, April 15, 2008 8:35 PM
Subject: Grid - Remember Last positions
Hello,
I have a grid in VFP9.
If a user resizes columns and changes the order of columns,
how can I remember the last grid positions the next time
the grid is displayed?
Thanks,
Kent
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.