Copy Paste is Disabled in Property Grid
- by ofarooq
Hi All,
I have a FileNameEditor inside a property grid, which has a few entries like
Main File : "C:\blah1"
Sec File: "C:\blah2"
and so on.
My problem is that I cannot copy and paste from one property entry to another, and I cannot type in the fields manually as well. Is there a specific property that will enable editing inside the FileNameEditor.
Example
public class MyEditor : FileNameEditor
{
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
{
return false;
}
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
object e = base.EditValue(context, provider, value);
if ((value as MyFileS) != null)
{
(value as MyFilesS).FileName = (String) e;
}
return e;
}
protected override void InitializeDialog(OpenFileDialog openFileDialog)
{
base.InitializeDialog(openFileDialog);
}
}
Thanks