Setting Data Control Edits Initial value when Appending records ....
Publicado: Jue Mar 03, 2011 10:27 am
Hi,
I am trying to set initial values into some Data Control Edits during
Appending of new records.
Below is the only code that I can get to work but seems complicated.
METHOD NlTranDsAddNew( oSender ) CLASS TForm1
::oNlTranDs:GoBottom() // Go to bottom
of file to pick up some field values
// This is a complicated way of getting default values into the Data
Aware Controls for editing
::oNlTranDs:TRANNO( dsOBJECT ):DefValue := ::oNlTranDs:TRANNO + 1
::oNlTranDs:FY( dsOBJECT ):DefValue := ::oNlTranDs:FY
// Data Controls will show these Values on the screen
RETURN Nil
I really want to put the values into the DataSet record buffer and then just
oDs:UpdateControls() to show the values, but cant get it to work.
Any thoughts on how to set & display these initial values would be
appreciated.
Chris
I am trying to set initial values into some Data Control Edits during
Appending of new records.
Below is the only code that I can get to work but seems complicated.
METHOD NlTranDsAddNew( oSender ) CLASS TForm1
::oNlTranDs:GoBottom() // Go to bottom
of file to pick up some field values
// This is a complicated way of getting default values into the Data
Aware Controls for editing
::oNlTranDs:TRANNO( dsOBJECT ):DefValue := ::oNlTranDs:TRANNO + 1
::oNlTranDs:FY( dsOBJECT ):DefValue := ::oNlTranDs:FY
// Data Controls will show these Values on the screen
RETURN Nil
I really want to put the values into the DataSet record buffer and then just
oDs:UpdateControls() to show the values, but cant get it to work.
Any thoughts on how to set & display these initial values would be
appreciated.
Chris