I'm trying to edit a List<string>
with a PropertyGrid and it's not firing a PropertyValueChanged event when it's contents are modified.
I researched this and tried to use a custom TypeConverter
class, but even when I get the editor to show and let me modify the values I can't get this event to fire.
I also tried using the below attribute and it pulls up the string editor, but this also doesn't fire the event on changes.
[Editor("System.Windows.Forms.Design.StringCollectionEditor, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
I also tried using a UITypeEditor
and overriding the EditValue
method, but this never fires when editing the values.
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
MessageBox.Show("This never appears...");
return base.EditValue(context, provider, value);
}
Is there a way to edit a List<string>
and fire the PropertyValueChanged event?