New to Telerik UI for WinFormsStart a free 30-day trial

Changing the Default Editors

Updated over 6 months ago

By default the grid is using the underlying field data type to determine the editor type. If you want to change the default editor you should use the EditorReqired event. For example the following snippet shows how you can change the default text editor to VirtualGridDropDownListEditor.

C#
        
private void RadVirtualGrid1_EditorRequired(object sender, VirtualGridEditorRequiredEventArgs e)
{
    if (e.ColumnIndex == 1)
    {
        VirtualGridDropDownListEditor dropDownListEditor = new VirtualGridDropDownListEditor();
        RadDropDownListEditorElement element = dropDownListEditor.EditorElement as RadDropDownListEditorElement;
        element.DataSource = new string[] { "Mr.", "Mrs.", "Ms.", "Dr." };
        e.Editor = dropDownListEditor;
    }
}

See Also

In this article
See Also
Not finding the help you need?
Contact Support