Hi Andrus,
I have tried to duplicate this error and can't. DeleteColumn works fine for me, as does reducing the ColumnCount. I'm curious about the "F3" ... are you enabling F3 as a hotkey to delete columns? If so, how?
Mark mentioned that Mike and I are interested in these posts. We are. It is of great service to us in our roles as testers to have people post what they believe are bugs, whether we can duplicate them or not or whether they are actual bugs.
OTOH, we can't spend a lot of time here trying to duplicate an issue posted as we are not product support and resolving issues here is not within our official duties. If a problem can't be resolved by the community here, I invite you to contact product support. Product support contact info can be found in the VFP7 help file under Microsoft Visual FoxPro Technical Support.
>I have a command F3 "change grid form" in my form.
>This command destroys all grid columns and then adds new columns to grid.
>
>To destroy columns I use
>
>
> this.gridbase1.columncount = 0
>
>
>I tried also
>
>
> DO WHILE this.gridbase1.columncount>0
> this.gridbase1.DeleteColumn
> ENDDO
>
>
>Using those commands in VFP 7 will cause C5 error sometimes. This works in VFP 5.
>
>Is there a way to re-create grid columns to avoid C5 error ?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05