Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid w. recSource Updating on Delete (w.out TABLEUPDATE)
Message
From
25/06/2003 09:32:25
 
 
To
25/06/2003 09:19:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00803726
Message ID:
00803733
Views:
9
Donald/Fred,

I believe you have to move the record pointer off the record after the delete and before the refresh()
delete
skip
if( eof() )
	go bottom
endif

this.Grid.Refresh()
>I have a Grid with RecordSource set to .DBF/Table.
>
>I set table buffering ON:
>
>*// This is the Grid RecordSource table.
>
>=CURSORSETPROP("buffer",5,"DD_ecrappdwg")
>
>Below the grid, I have both an Add and a Delete button to either Add or Remove a record for table underlying the Grid.
>
>The problem I've noticed is that unless I do a TABLEUPDATE to Grid recordsource table after DELETE, the row/record does not go away from Grid, even after Form.Refresh. I don't want to do TABLEUPDATE right away here, for reasons explained in next paragraph.
>
>The form itself has a series of textboxes, comboboxes that are linked to underlying table (BindControls = .T. for form). This table is different from table used as recordsource for Grid. At the base of the entire form I have both a Save and Cancel button. When Save is clicked a TABLEUPDATE is performed on both Grid recordsource, and form base Table to add any records added, or delete any records deleted (prior to TABLEUPDATE). If Cancel is clicked a ROLLBACK is done to revert both tables to initial state.
>
>How can I update Grid on Delete action, without doing TABLEUPDATE immediately after DELETE on recordsource table?
>
>Thanks,
>
>Fred Z - Boston MA
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform