CollectionEditor

  • Thread starter Thread starter Maxim S. Lee
  • Start date Start date
M

Maxim S. Lee

Hello everybody.

How can I call CollectionEditor from the code, not by click on visual
buttons in PropertyGrid?

I suppose I have to inherit UITypeEditor, set my custom CollectionEditor as
default CollectionEditor for my Collection, override EditValue method and
call EditValue?

Can anybody send example?

Max
 
This appears to work:

public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
CollectionEditor.CollectionForm form = CreateCollectionForm();
form.EditValue = value;
form.ShowDialog();
return value;
}

User submitted from AEWNET (http://www.aewnet.com/)
 
Back
Top