CollectionEditor


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
 
Ad

Advertisements

G

Guest

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/)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top