New to Telerik UI for WinForms? Download free 30-day trial

Default Editors

When an edit operation is about to begin, RadListView initializes a ListViewTextBoxEditor. The following table lists the built-in editors that RadListView provides:

Editor Description
ListViewTextBoxEditor Used for editing text input.
ListViewDropDownListEditor Used for editing values providing a predefined list of values.
ListViewSpinEditor Used for editing of numeric data types.
ListViewDateTimeEditor Used for editing of type DateTime.

The following example shows how you can use the predefined editors:

Start editing


void radListView1_EditorRequired(object sender, Telerik.WinControls.UI.ListViewItemEditorRequiredEventArgs e)
{
    if (e.ListViewElement.CurrentColumn.FieldName == "CustomerName")
    {
        e.EditorType = typeof(ListViewTextBoxEditor);
    }
    else if (e.ListViewElement.CurrentColumn.FieldName == "ProductName")
    {
        ListViewDropDownListEditor editor = new ListViewDropDownListEditor();
        (editor.EditorElement as BaseDropDownListEditorElement).Items.Add("Product1");
        (editor.EditorElement as BaseDropDownListEditorElement).Items.Add("Product2");
        (editor.EditorElement as BaseDropDownListEditorElement).Items.Add("Product3");

        e.Editor = editor;
    }
    else if (e.ListViewElement.CurrentColumn.FieldName == "Quantity")
    {
        e.EditorType = typeof(ListViewSpinEditor);
    }
    else if (e.ListViewElement.CurrentColumn.FieldName == "OrderDate")
    {
        e.EditorType = typeof(ListViewDateTimeEditor);
    }
}
In this article