Editing Text View
Methods and Properties
The editing process in the text view of RadGanttView goes through a similar lifecycle as other controls using our editors system.
There are three main methods that can be used to control the editing and two properties that you can use:
BeginEdit: Puts the current cell in edit mode, opening an editor and moving the focus to that editor.
EndEdit: If the gantt view is in edit mode, ends the editing and commits any changes.
CancelEdit: If the gantt view is in edit mode, end the editing and discards any changes.
IsEditing: Gets a value indicating whether this instance is in edit mode.
ActiveEditor: Gets the editor instance if an editor is opened.
You can configure RadGanttView so that items enter edit mode directly when the item is selected or when users press F2, Space or Enter or click for a second time on the item without triggering a double click event. The BeginEditMode property of RadGanttViewElement controls this behavior.
There are several build-in editors which are used for editing different data types. These editors can be customized or can be replaced by custom editors all together. Here is a list of the build-in editors and the data types they are used for:
BaseSpinEditor: Used for editing numeric types.
BaseDateTimeEditor: Used for editing DateTime.
BaseTextBoxEditor: Used for editing all other types not handled by the above two editors.
During the editing process there are a number of events that are fired at various points. Here is their order and purpose:
EditorRequired: Fired when an editor is about to be opened. This is the place where you can change the editor that will be used.
EditorInitialized: Fired when an editor is instantiated and visible. Allows you to modify the actual editor.
ItemValidating: Fires when an item loses input focus, enabling content validation. Can be cancelled.
ItemValidated: Fires after the item has finished validating.
ItemEdited: Fires when the editing process is finished.