>I have a form with a pageframe with 4 pages and 1 grid in every page.
>The grids recordsource is a cursor.
>Im adding some records to the cursor programaticly.
>I use this command for refreshing the grid.
>this.parent.parent.Page1.pageframe1.Page2.Grid1.recordsource = this.parent.parent.Page1.pageframe1.Page2.Grid1.recordsource
>Its work fine sometime.
>But sometime the grids headernames or inputmask or other properties ar loes after this step.
>Any ideas.
>Thanks.
Cemal, if you only want to refresh the grid you should use grid.refresh().
If you reset the grid.recorsource the grid looses its settings. before doing so you have to set grid.recorsource = "". If your column.controlsources are not in default order you need to reset them also after resetting the recordsource.
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