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

Customizing editor

The appearance and behavior of property grid editors can be changed programmatically. This can be done in the EditorInitialized event. EditorInitialized is fired when the editor is created and initialized with a predefined set of properties.

The following sample demonstrates how to change the default font of a BaseTextBoxEditor in RadGanttView:

private void GanttViewElement_EditorInitialized(object sender, GanttViewItemEditorInitializedEventArgs e)
    BaseTextBoxEditor editor = e.Editor as BaseTextBoxEditor;
    if (editor != null)
        ((RadTextBoxElement)editor.EditorElement).Font = new Font(FontFamily.Families[12], 12, FontStyle.Bold);

Private Sub GanttViewElement_EditorInitialized(sender As Object, e As GanttViewItemEditorInitializedEventArgs)
    Dim editor As BaseTextBoxEditor = TryCast(e.Editor, BaseTextBoxEditor)
    If editor IsNot Nothing Then
        DirectCast(editor.EditorElement, RadTextBoxElement).Font = New Font(FontFamily.Families(12), 12, FontStyle.Bold)
    End If
End Sub

See Also

In this article
Not finding the help you need? Improve this article