This example demonstrates how to use a custom editor for editing in the PropertyGridControl.
This task can be completed in the following ways.
1. Use a custom UITypeEditor. For this, create a custom UITypeEditor descendant and mark a property of a corresponding object with the System.ComponentModel.Editor attribute in the following manner:
[C#]publicclassFile{[System.ComponentModel.Editor(typeof(UIEditors.FilteredFileNameEditor),typeof(System.Drawing.Design.UITypeEditor))]publicstringPath{get;set;}
Please refer to the UITypeEditor Class article for more information.
2. Assign a ButtonEdit to a cell as shown in the Assigning Editors to Editor Rows article and handle its ButtonClick event.