hello,
I have got a little problem for some days, i don't really understand when the CreatedRow (event of the binding source) is raised.
Here is the sample :
CREATE ttCamion.
hTopQuery = hds:TOP-NAV-QUERY(1).
hTopQuery:QUERY-OPEN.
The row in the BS is well added but the event CreateRow is not raised. does someone know what the problem is?
Thanks
Hey Patrick,
the CreateRow event of the BindingSource is raised if you programmatically add a row using the BindingSource:AddNew () method or if you are using the UltraControls enabling the UltraGrid to create rows.
If you do create a row inside of the TEMP-TABLE the BindingSource has to be repositioned to the new row by code query:REPOSITION-TO-ROWID ().
Regards,
Marko
If you do create a row inside of the TEMP-TABLE the BindingSource has to be repositioned to the new row by code query:REPOSITION-TO-ROWID ().
Just to make that a bit clearer. When the UI initiates the creation of a new row (like described in Marko's) the CreateRow event is raised. There you should do something like:
CREATE ttCamion.
hTopQuery:CREATE-RESULT-LIST-ENTRY() .
e:Created = TRUE.
In this case there is no need to reposition the query.
a) the record is still available and
b) the query is not yet aware of the new record (therefor the CREATE-RESULT-LIST-ENTRY).
Be aware, that the Buffer ttCamion needs to be the same buffer that is navigated by the query.
And how can the query get awared of the new row added after a create ttCamion?
And how can the query get awared of the new row added after a create ttCamion?
hTopQuery:CREATE-RESULT-LIST-ENTRY() .
Thank you.That works. Actually,I had another problem but thank you for your help