title: How to add custom properties to a custom webcontrol
body: <p>I want to add custom typed properties to a webcontrol, like for example EditRowStyle in GridView, but in a way that the property's properties can be declared in Source view in ascx/aspx. It's clear that GridView hasn't got a property like EditRowStyle-BackColor, but only EditRowStyle has. Something like this:</p>
  
  <pre><code>public class MyCustomGrid : GridView
  {
    [...]
    private MyCustomSettings customSettings;
    public MyCustomSettings CustomSettings
          {
              get { return customSettings; }
          }
    [...]
  }
  
  public class MyCustomSettings 
  {
    private string cssClass = "default";
    public string CssClass
    {
      get { return cssClass; }
      set { cssClass = value; }
    }
  }
  </code></pre>
  
  <p>And the grid decalartion:</p>
  
  <pre><code>&lt;c1:MyCustomGrid ID="grdCustom" runat="server" CustomSettings-CssClass="customcss" /&gt;
  </code></pre>
  
  <p>Because this solution doesn't work.</p>