Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have a look at creating a UITypeEditor, i think that if you use an editor you will have more control over the list and be able to tell if the current value is null and if so you can have the editor show a blank grid or something where list items can be added or removed, you could also add a checkbox to tell the editor to return null again and set null on the property, the editor is basically a WinForm so you can do almost anything in it.</p> <pre><code>internal class GenericTypeEditor : UITypeEditor { public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { IWindowsFormsEditorService winFormEditorSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); using (MyForm editorForm = new MyForm()) { if (winFormEditorSvc.ShowDialog(editorForm) == System.Windows.Forms.DialogResult.OK) value = editorForm.ReturnObject; } return value; //this can be null if you wish } public override UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context) { return UITypeEditorEditStyle.Modal; } } </code></pre> <p>Then just set the attribute on your property</p> <pre><code>[EditorAttribute(typeof(GenericTypeEditor), typeof(System.Drawing.Design.UITypeEditor))] public List&lt;Inner&gt; InnerData { get; set; } </code></pre> <p>This article helped me in the past, maybe it is of help to you: <a href="http://msdn.microsoft.com/en-us/library/ms171840(v=vs.100).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms171840(v=vs.100).aspx</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload