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:
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; }
}
}
And the grid decalartion:
<c1:MyCustomGrid ID="grdCustom" runat="server" CustomSettings-CssClass="customcss" />
Because this solution doesn't work.