Page 1 of 1

Check updated gets in a group

Posted: Fri Jul 08, 2011 11:44 pm
by c-tec
Hello Roger,
I have dialogs with tabpages that contain on the first tabpage the browser of the data, and on the second the details. When the second tab gets focus, I read the content of the row in variables for editing. When the user is ready, there is a "save" button to write the var's back to the database. Also I take care, that nobody in the network has changed the record in the meantime. For this I save the actual record bevor editing and compare it if changed bevore I write the new data back.
Now I would like to determine if gets of the second details tabpage have been updated, so that I can write them back automatically without the save button when changign to the first tab. So the record would be not lost if a user forget to click the save button. A dc_updated(cGroup) when focus get lost on the second tabpage would be nice. Or do you have another idea ?
regards
Rudolf

Re: Check updated gets in a group

Posted: Sat Jul 09, 2011 1:18 am
by skiman
Hi Rudolf,

I suppose this must be easy to implement with the lostfocus of the dctabpage. You can use DC_GetOrigUpdated () to check if there are changes.

Re: Check updated gets in a group

Posted: Sat Jul 09, 2011 2:03 am
by c-tec
Hello Chris,
thank you, thas exactly what I need!
regards
Rudolf

Re: Check updated gets in a group

Posted: Sat Jul 09, 2011 4:11 am
by c-tec
Hello,
now I have another problem. How can I mark the gets as updated when I save the gets back in the database ? I am not saving when leaving the dialog, I have a button for this task. So when I save with the button and then change the tab, the gets are still marked as updated. Which arrayelement of the getlist holds the info for updating ? I could change this info when saving back.
regards
Rudolf

Re: Check updated gets in a group

Posted: Sat Jul 09, 2011 10:33 am
by Wolfgang Ciriack
Hi Rudolf,
DC_GetOrigSet ?

Re: Check updated gets in a group

Posted: Sun Jul 10, 2011 1:48 am
by c-tec
Hello Wolfgang,
thank you, I did not recogince that the sample shows how to do it
regards
Rudolf