AcceptText

Description

Applies the contents of the DataWindow’s edit control to the current item in the buffer of a Web DataWindow client control. The data in the edit control must pass the validation rule for the column before it can be stored in the item.

Applies to

Web DataWindow client control

Syntax

number objdwcontrol.AcceptText ( )

Argument

Description

objdwcontrol

A reference to a Web DataWindow client control

Returns

Returns 1 if it succeeds and -1 if it fails (for example, the data did not pass validation).

Usage

When a user moves from item to item in a Web DataWindow client control, the control validates and accepts data the user has edited.

When a user modifies a DataWindow item then immediately changes focus to another control in the window, the Web DataWindow client control does not accept the modified data—the data remains in the edit control. Use the AcceptText method in this situation to ensure that the DataWindow object contains the data the user edited.

NoteAcceptText in the ItemChanged event Calling AcceptText in the ItemChanged event has no effect.