The Dojo Inline Edit builder allows you to add editing capabilities to a Data Page field so that it initially appears as read-only text.
The editing of the read-only text is controlled by a builder input, Edit On Text Select
. If this input is not set, the text can be edited by clicking a pencil edit icon next to the text field. (You can control the icon that is used by specifying a graphic file in the Image
input of the Edit Button Images
builder input group.) If this input is set, editing mode is entered by the user clicking the text in the field. The Image
input is not used.
The builder input Allow Multiple Edits
also lets you allow multiple fields to be edited simultaneously or restricts edits to a single field at a time.
Once editing is complete, the application user has the option to cancel the changes or save the results either to the page (as a hidden input) or submit the outer form.
Client side automatic cancel event
If the Allow Multiple Edits
input is not set in the builder, the builder automatically cancels an ongoing edit in the current field if the user selects another field to edit. When automatic canceling is about to occur, the builder fires a client event named processInlineAutoCancel
. To provide feedback to the user, handle this event in your model. For example, you can add a Client Event Handler builder that runs a script that asks users whether they wish to cancel their edits.
var answer = confirm ("Select OK to edit another field, or
Cancel to remain in the current field.")
this.inlineEditState.continueAutoCancel = answer;
The client event is passed to an inlineEditState
object that contains a continueAutoCancel
field. If you set continueAutoCancel
to true in your script, the cancel operation continues. Otherwise, a false value leaves the focus on the current field.
Parent topic: Builder Reference: wpf7
About using the builder call editor: wpf7