>Hi, foxes!
>
>I have a grid which I populate with a cursor. I create this cursor everytime the user click on a page of a pageframe. In each moment I do that, I lost my grid settings. With properties is OK, 'cause I can set within code, but what about the methods?!? What can I do to prevent lost my methods code?
>
>Thanks in Advance!
Claudio, before you recreate the cursor you have to set grid.recordsource = ""
and reset it after you recreated the cursor, because right now you just rip off the recordsource from the grid. You may alsoo need to reset column.controlsources if you need them in certain order (not in default one.)
You should consider using the parameterized view as a recordsource for your grid and you will not have those troubles.
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison