General information
Category:
Forms & Form designer
>>1. I dont know where to put the append blank. What I want is when the user clicks the grid for the first time
>>a blank record should be added and then when he presses down arrow more records should be added. He
>>will also have the freedom to click on the deleted mark to delete one or all of the child records. All this facility
>>is only in add mode which I keep track by setting a flag as soon as he clicks add button.
>
>For the APPEND BLANK:
>SELECT MyChildTable
>APPEND BLANK
>
>New records in grid: implementing your functionality for adding new records in grid is ratter hard to program. You need to add code in the GotFocus() and the AfterRowColChange() of the grid. A better approach will be to put a Add button beside your grid.
>
>>2. I have included a On Error errflag = .t. statement as Mr. Eric has suggested in one of a previous thread. But
>>it is not going to the roll back as far as the master table is concerned. So I end up with a master record without
>>a child record
>
>TableUpdate() won't trigger the ON ERROR when it fail if record or table buffering is enabled. TableUpdate() will return .F. in that case, so you could check:
>
>IF NOT TableUpdate()
> WAIT WINDOW "Save not commited"
>ENDIF
Hi Sylvain.
Thank you for putting up a very patient and elaborate reply. Thank you very much as it has helped me
understand one of my misunderstanding of Tableupdate(). I thought it will trigger an error if the update was
not successful.
There is one more serious problem for me. I turn or the the delemark when in add mode and turn it off after
the save operation. But when the grid comes back it is displayed with a structure of its own loosing the
original structure. Can there be a solution for this??
Thanks for the help
alex
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only