DbNetEdit

Top  Previous  Next

Properties

mode

The mode property indicates the current mode of the edit control. Possible values are insert, update, readonly and disabled

autoIncrementValue

This property is set to the value of the primary key that has been generated when inserting a record.

Run Sample

Methods

addInputControlButton

This method is used to add a custom button adjacent to the input field

Syntax

var button = control.addInputControlButton(columnName);

Arguments

columnName

The name of the column or the ID of the EditField control

Returns

A reference to the created button

Example

Run Sample

getInputControl

The get input control method is used to get a reference to the client-side input element for the specified column.

Syntax

control.getInputControl(columnName);

Arguments

columnName

The name of the column or the ID of the EditField control

Returns

A reference to the client input control (or null if not found)

Example

Remarks

The first argument to the handler is always a reference to the client-side control that raised the event. For some events additional parameters may also be passed.

 

refreshListOptions

Refreshes the list of items in a lookup list. If an Array of options is passed as a second argument then this array is used to populate the list.

Syntax

control.refreshListOptions(columnName, options);

Arguments

columnName

The database name of the column columnName

options (Optional)

Array can be either an array of strings where the value and text are the same or an array of 2 element string arrays where the value and text are different.

Example

Events

Run Sample

onInitialized

This event is fired when the client-side control is initialized.

onNoRecordsFound

This event is fired if the edit control returns no data records.

 

onInsertInitialize

This event is fired when you create a new record, before any values have been entered.

 

onRecordSelected

This event is fired when a record is selected.

 

onFieldValueChanged

This event is fired when a field value has been updated

 

onBeforeRecordValidated

This event is fired before a record is inserted or updated.

 

onBeforeRecordInserted

This event is fired before a record has been inserted.

 

onBeforeRecordUpdated

This event is fired before a record is updated.

 

onRecordInserted

This event is fired after a record has been inserted

 

onRecordUpdated

This event is fired after a record has been updated.

 

onRecordInsertError

This event is fired when an error is encountered while inserting a record.

 

onRecordUpdateError

This event is fired when an error is encountered while updating a record.

 

onBeforeTinyMceInit

This event is fired just before the TinyMCE editor in configured and provides an opportunity for custom configuration of the editor. The handler is passed a second argument which is the configuration object that is passed to the TinyMCE init method. You can make changes to this configuration object in the handler. The handler is called twice. Once for the Simple version of the editor and once for the advanced version. The config object has a property called isAdvancedMode which allows you to distinguish between the 2 calls