Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Problem
Message
From
07/02/2002 07:52:52
 
 
To
07/02/2002 07:22:06
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00615913
Message ID:
00616523
Views:
28
Hi!

Hmm, I tried this and many other approaches and it did not worked.

What I'm going to do is a simple form with grid with AllowAddNew=.T. When user add new record, then add again, previous empty record should be deleted. When use moves out of new record, it shoul dbe deleted too. So, it will look like only one empty record could be edited at that moment. I'm doing DELETE in BeforeRowColChange after checking if record is empty. Tried refreshing of grid in both events Before- and AfterRowColChange. You can easy re-create all this on a simple form. While records deleted are removed from grid displaying ok when they're not at the end of the grid, all ok. The last record do not want to be removed whatever I tried.

I can try also a buffering and tablerevert() only for one record instead of DELETE command, but I though DELETE would be more simple for programming. Unfortunately, it does not works. It looks like grid holds that deleted record for some reason till grid is destroyed and created again.

Any ideas?

>Vlad,
>
delete
>if !eof()
> skip
>endif
>if eof()
> go bottom
>endif
>thisform.myGrid.refresh
Works in simple grids. If that's something else then send the form :)
>Cetin
>
>>Hi!
>>
>>Cetun, do you know also a workaround for deletign the last record? I put a grid on the form, added a few records, then deleted last. Whatever I do, I cannot refresh the grid to hide that record. I even tried to change the order of records, so deleted records are forst in grid. Did not helped. If needed, I will send you a form. It is pretty simple. VFP6 SP5 and VFP7 show the same behaviour.
>>
>>>>I don't know why whenever after I do the deleting, the data still remain in the grid as well as other components like textbox or combobox ! I had checked my table, it shown that the particular data already deleted. For updating, each time after the updating, it will add another same record in the form(i load the data from a cursor to a form one by one) but in my cursor it always has one record. why ?
>>>
>>>set deleted on
>>>move the pointer off from deleted record and refresh
>>>Cetin
>>>>
>>>>please help me.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform