Skip to content

Commit

Permalink
DataGrid: update onEditorPreparing (DevExpress#7099)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladaskorohodova committed Mar 4, 2025
1 parent 56d01c5 commit 8c4aa83
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ default: null
---
---
##### shortDescription
A function used to customize a cell's [editor](/api-reference/_hidden/GridBaseColumn/editorOptions.md '{basewidgetpath}/Configuration/columns/#editorOptions'). Not executed for cells with an [editCellTemplate](/api-reference/_hidden/dxDataGridColumn/editCellTemplate.md '{basewidgetpath}/Configuration/columns/#editCellTemplate').
A function used to customize cell [editors](/api-reference/_hidden/GridBaseColumn/editorOptions.md '{basewidgetpath}/Configuration/columns/#editorOptions'). Not executed for cells with an [editCellTemplate](/api-reference/_hidden/dxDataGridColumn/editCellTemplate.md '{basewidgetpath}/Configuration/columns/#editCellTemplate').

##### param(e): ui/data_grid:EditorPreparingEvent
Information about the event that caused the function's execution.
Information about the event that caused function execution.

##### field(e.cancel): Boolean
Allows you to cancel the editor's creation.
Allows you to cancel editor creation.
You can set this field's value to **true** and implement a custom editor.

##### field(e.component): {WidgetName}
The UI component's instance.
UI component instance.

##### field(e.dataField): String
The name of the field that supplies data for the column's editor.
The field name that supplies data for the column editor.

##### field(e.disabled): Boolean
Indicates whether the editor is disabled.
Expand All @@ -31,35 +31,35 @@ Allows you to change the editor. Accepts names of DevExtreme UI components only,
Import a new editor's module when [DevExtreme modules](/concepts/Common/Modularity/02%20DevExtreme%20Modules%20Structure '/Documentation/Guide/Common/Modularity/DevExtreme_Modules_Structure/') are used.

##### field(e.editorOptions): Object
Gets and sets the editor's configuration.
Gets and sets editor configuration.

##### field(e.element): DxElement
#include common-ref-elementparam with { element: "UI component" }

##### field(e.parentType): String
The editor's location. One of *"dataRow"*, *"filterRow"*, *"headerRow"* or *"searchPanel"*.
Properties passed to the function depend on this value.
Editor location. Can be *"dataRow"*, *"filterRow"*, *"headerRow"* or *"searchPanel"*.
Properties passed to the **onEditorPreparing** function depend on this value.

##### field(e.readOnly): Boolean
Indicates whether the editor is read-only.

##### field(e.row): dxDataGridRowObject
The [properties](/api-reference/10%20UI%20Components/dxDataGrid/6%20Row '/Documentation/ApiReference/UI_Components/dxDataGrid/Row/') of the row's editor.
Row editor [properties](/api-reference/10%20UI%20Components/dxDataGrid/6%20Row '/Documentation/ApiReference/UI_Components/dxDataGrid/Row/').

##### field(e.rtlEnabled): Boolean
Indicates whether the editor uses right-to-left representation.

##### field(e.setValue): any
A method you should call to change the cell value and, optionally, the displayed value after the editor's value is changed.
Use this method to change cell value. You can also pass a second value to the method to change the displayed value, but only for data row editors in a column with [calculateDisplayValue](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#calculateDisplayValue).

##### field(e.updateValueTimeout): Number
Gets and sets the delay between when a user stops typing a filter value and the change is applied. Available if the **parentType** is *"filterRow"* or *"searchPanel"*.

##### field(e.value): any
The editor's value. This field is read-only. To change the editor's value, use the **setValue(newValue, newText)** function parameter.
Editor value. This field is read-only. To change editor value, use the **setValue(newValue, newText)** function parameter.

##### field(e.width): Number
The editor's width; equals **null** for all editors except for those whose **parentType** equals *"searchPanel"*.
Editor width; equals **null** for all editors except for those whose **parentType** equals *"searchPanel"*.

---
Use this function to:
Expand Down Expand Up @@ -255,9 +255,9 @@ Use the **parentType** function parameter to check if the editor that the functi

[note]

- We do not recommend that you use the **onEditorPreparing** function to specify an editor's default value. Use the [onInitNewRow](/api-reference/10%20UI%20Components/dxDataGrid/1%20Configuration/onInitNewRow.md '{basewidgetpath}/Configuration/#onInitNewRow') function instead.
- We do not recommend that you use the **onEditorPreparing** function to specify default editor values. Use the [onInitNewRow](/api-reference/10%20UI%20Components/dxDataGrid/1%20Configuration/onInitNewRow.md '{basewidgetpath}/Configuration/#onInitNewRow') function instead.

- This function has the highest priority over the other editing tools. The order of priority is as follows: **onEditorPreparing** > [columns](/api-reference/10%20UI%20Components/dxDataGrid/1%20Configuration/columns '{basewidgetpath}/Configuration/columns/').[formItem](/api-reference/_hidden/GridBaseColumn/formItem.md '{basewidgetpath}/Configuration/columns/#formItem') > [editing](/api-reference/10%20UI%20Components/dxDataGrid/9%20Types/Editing '{basewidgetpath}/Configuration/editing/').[form](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/editing/form.md '{basewidgetpath}/Configuration/editing/#form').
- This function has higher priority over other editing tools. The order of priority is as follows: **onEditorPreparing** > [columns](/api-reference/10%20UI%20Components/dxDataGrid/1%20Configuration/columns '{basewidgetpath}/Configuration/columns/').[formItem](/api-reference/_hidden/GridBaseColumn/formItem.md '{basewidgetpath}/Configuration/columns/#formItem') > [editing](/api-reference/10%20UI%20Components/dxDataGrid/9%20Types/Editing '{basewidgetpath}/Configuration/editing/').[form](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/editing/form.md '{basewidgetpath}/Configuration/editing/#form').

[/note]

Expand Down

0 comments on commit 8c4aa83

Please sign in to comment.