I have a project in my VS 2008 solution containing file items. Each item have a standard read only property called "FullPath" in the Properties Grid.
What is the easiest way to make the FullPath property of the Properties Grid editable?
I have a project in my VS 2008 solution containing file items. Each item have a standard read only property called "FullPath" in the Properties Grid.
What is the easiest way to make the FullPath property of the Properties Grid editable?
Add reference to System.Design
Create class
public class DllFileNameEditor :
System.Windows.Forms.Design.FileNameEditor { protected override void InitializeDialog(OpenFileDialog openFileDialog)
{
base.InitializeDialog(openFileDialog);
openFileDialog.Filter = "Class Library Files (*.dll) |*.dll|All (*.*) |*.*";
openFileDialog.Title = "Select Class Library File";
} }
Modify property
[Category("Identity")]
[Description("Dll Location")]
[EditorAttribute(typeof(DllFileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string DllName
{
get { return this.GraphDoc.DllName; }
set { this.GraphDoc.DllName = value; }
}
mgznet.com/EditFullPathProperty.aspx